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

:root {
  --bg: #ffffff;
  --bg2: #fafafa;
  --bg3: #f4f4f5;
  --bg4: #e4e4e7;
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(0, 0, 0, 0.12);
  --gold: #b48c26;
  --gold2: #d4af37;
  --gold3: #f3e5ab;
  --goldglow: rgba(212, 175, 55, 0.15);
  --text: #09090b;
  --text2: #52525b;
  --text3: #71717a;
  --red: #ef4444;
  --green: #10b981;
  --white: #ffffff;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', monospace;
  --r: 8px;
  --r2: 16px;
  --r3: 24px;
  --surface: rgba(0, 0, 0, 0.03);
  --surface-hover: rgba(0, 0, 0, 0.06);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --grid-color: rgba(0, 0, 0, 0.04);
  --purple-main: #5a45ff;
  --purple-hover: #4e3ae0;
  --pink-main: #ec4899;
  --grad-text: linear-gradient(135deg, var(--purple-main) 0%, var(--pink-main) 100%);
}

[data-theme="dark"] {
  --bg: #09090b;
  --bg2: #0f0f13;
  --bg3: #18181b;
  --bg4: #27272a;
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.12);
  --gold: #d4af37;
  --gold2: #f3e5ab;
  --gold3: #fdf6d8;
  --goldglow: rgba(212, 175, 55, 0.12);
  --text: #f4f4f5;
  --text2: #a1a1aa;
  --text3: #71717a;
  --red: #ef4444;
  --green: #10b981;
  --white: #ffffff;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', monospace;
  --r: 8px;
  --r2: 16px;
  --r3: 24px;

  --surface: rgba(255, 255, 255, 0.02);
  --surface-hover: rgba(255, 255, 255, 0.04);
  --nav-bg: rgba(9, 9, 11, 0.85);
  --grid-color: rgba(255, 255, 255, 0.03);
  --purple-main: #7c3aed;
  --purple-hover: #8b5cf6;
  --pink-main: #f472b6;
  --grad-text: linear-gradient(135deg, var(--purple-main) 0%, var(--pink-main) 100%);
}

html {
  scroll-behavior: smooth
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden
}

/* ══════════════════════════════════════
   SHARED NAV
══════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 65px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.nav-brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-hover)
}

.nav-link.active {
  color: var(--gold2)
}

.nav-cta {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: var(--font-sans);
  margin-left: 8px;
}

.nav-cta:hover {
  background: var(--gold2);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════
   PAGE SYSTEM
══════════════════════════════════════ */
.page {
  min-height: 100vh;
  padding-top: 65px;
  position: relative;
}

/* Utilities */
.text-gradient {
  background: linear-gradient(135deg, var(--gold2) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: normal;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ══════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════ */
#page-landing {
  background: var(--bg);
}

.hero-bg-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 8rem 2rem 6rem;
  text-align: center;
  background-image: radial-gradient(ellipse 60% 60% at 50% 0%, var(--goldglow) 0%, transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
}

.hero-badge .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: 0.5;
    transform: scale(1.3)
  }
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 400;
  line-height: 1;
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 19px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 3rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  background: var(--gold2);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  font-family: var(--font-sans);
  transition: all 0.3s;
}

.btn-secondary:hover {
  border-color: var(--border2);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* stats bar */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  background: var(--surface);
  max-width: 720px;
  margin: 5rem auto 0;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.stat-item {
  flex: 1;
  padding: 1.5rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat-item:last-child {
  border-right: none
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--gold2);
  margin-bottom: 4px
}

.stat-label {
  font-size: 12px;
  color: var(--text3);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* features */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 7rem 2rem
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 100px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 17px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 540px;
  font-weight: 300
}

.section-header-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: flex-end;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 2.5rem 2rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
  background: var(--surface-hover);
  border-color: var(--border2);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r);
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--text)
}

.feature-card p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  font-weight: 300
}

/* templates showcase */
.templates-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}

.tpl-showcase {
  border: 1px solid var(--border);
  border-radius: var(--r2);
  background: var(--surface);
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tpl-showcase:hover {
  border-color: var(--goldglow);
  background: var(--surface-hover);
  transform: translateY(-4px)
}

.tpl-showcase-icon {
  margin-bottom: 1.5rem;
}

.tpl-showcase h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text)
}

.tpl-showcase p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6
}

.tpl-badge {
  display: inline-block;
  margin-top: auto;
  padding-top: 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
}

/* CTA section */
.cta-section {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  background: radial-gradient(ellipse 60% 60% at 50% 100%, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
}

.cta-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 8rem 2rem;
  text-align: center
}

.cta-inner h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 6vw, 64px);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  font-weight: 400;
}

.cta-inner p {
  font-size: 18px;
  color: var(--text2);
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.6;
}

/* footer */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text3);
}

footer a {
  color: var(--text3);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--text)
}

/* ══════════════════════════════════════
   APP PAGE (GENERATOR)
══════════════════════════════════════ */
#page-app {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 65px);
  overflow: hidden;
}

body.app-shell {
  height: 100vh;
  overflow: hidden;
}

.app-layout {
  flex: 1;
  display: flex;
  gap: 0;
  height: 100%;
  min-height: 0;
}

/* sidebar */
.sidebar {
  width: 320px;
  min-width: 320px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar::-webkit-scrollbar {
  width: 4px
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 2px
}

.sb-section {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border)
}

.sb-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.sb-field {
  margin-bottom: 1rem
}

.sb-field:last-child {
  margin-bottom: 0
}

.sb-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}

.sb-field input,
.sb-field select,
.sb-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg3);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}

.sb-field input:focus,
.sb-field select:focus,
.sb-field textarea:focus {
  border-color: var(--gold);
  background: var(--bg2);
}

.sb-field textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5
}

.sb-field select option {
  background: var(--bg3)
}

.tpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 2px;
}

.sb-sub {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 10px;
}

.tpl-btn {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 10px;
  cursor: pointer;
  text-align: center;
  background: var(--bg3);
  transition: all 0.2s;
}

.tpl-btn:hover,
.tpl-btn.active {
  border-color: var(--gold);
  background: var(--goldglow)
}

.tpl-btn .ti {
  font-size: 20px;
  margin-bottom: 6px
}

.tpl-btn span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3
}

.clause-list {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.clause-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg3);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  color: var(--text2);
}

.clause-btn:hover {
  border-color: var(--border2);
  color: var(--text)
}

.clause-btn.active {
  border-color: var(--gold);
  color: var(--text);
  background: var(--goldglow)
}

.clause-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--text3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 0.2s;
  color: transparent;
}

.clause-btn.active .clause-check {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg)
}

/* app topbar */
.app-topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.app-btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border)
}

.app-btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--surface-hover)
}

.app-btn-gold {
  background: var(--text);
  color: var(--bg)
}

.app-btn-gold:hover {
  background: var(--gold2)
}

/* preview */
.preview-wrap {
  flex: 1;
  background: #18181b;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.clause-reset-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12px;
  transition: all 0.2s;
}

.clause-reset-btn:hover {
  border-color: var(--gold);
  color: var(--text);
  background: var(--goldglow);
}

.preview-inner {
  flex: 1;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center
}

/* CONTRACT DOC */
#contract-doc {
  width: 794px;
  min-height: 1123px;
  background: #ffffff;
  color: #09090b;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  padding: 72px 80px;
  position: relative;
  font-family: 'Geist', 'DM Sans', sans-serif;
  border-radius: 2px;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #09090b;
}

.doc-brand {
  font-family: var(--font-serif);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #71717a;
  letter-spacing: 0.05em;
  text-transform: uppercase
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #27272a;
  color: #09090b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0;
}

.brand-style {
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid #d4d4d8;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* Print styles: hide UI chrome and render only the contract document cleanly */
@media print {
  @page { size: A4; margin: 12mm; }

  /* hide app chrome */
  nav, .sidebar, .app-topbar, .toast, .tpl-grid, .sb-section, .app-btn, .preview-wrap { display: none !important; }

  /* make contract take full printable area */
  body, html { height: auto; overflow: visible; }
  #contract-doc {
    position: static !important;
    width: auto !important;
    min-height: auto !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 16mm !important;
    background: #fff !important;
    border-radius: 0 !important;
  }

  /* avoid breaking inside clause sections */
  .clause-sec, .party-box, .sig-grid > div {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* improve text colors for print */
  .clause-txt, .preamble, .party-detail { color: #000 !important; }
  .doc-header, .doc-title, .doc-meta { color: #000 !important; }

  /* remove backgrounds and decorations that don't print well */
  .gold-hr { background: #000 !important; height: 1px !important; }
}

.doc-meta {
  text-align: right;
  font-size: 11px;
  color: #52525b;
  line-height: 1.7;
  font-family: 'Geist Mono', monospace
}

.doc-title {
  text-align: center;
  margin-bottom: 2.5rem
}

.doc-title h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: #09090b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 8px
}

.doc-title .sub {
  font-size: 12px;
  color: #71717a;
  letter-spacing: 0.1em;
  text-transform: uppercase
}

.gold-hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #d4af37, transparent);
  margin: 2rem 0
}

.preamble {
  font-size: 14px;
  line-height: 1.8;
  color: #09090b;
  text-align: justify;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid #d4af37;
  background: #fafafa;
  border-radius: 0 4px 4px 0
}

.parties-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem
}

.party-box {
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  background: #fafafa
}

.party-role {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d4af37;
  margin-bottom: 8px
}

.party-name {
  font-family: var(--font-serif);
  font-size: 18px;
  color: #09090b;
  margin-bottom: 6px
}

.party-detail {
  font-size: 13px;
  color: #52525b;
  line-height: 1.6
}

.clause-sec {
  margin-bottom: 1.75rem
}

.clause-hd {
  font-family: var(--font-serif);
  font-size: 16px;
  color: #09090b;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 12px
}

.clause-n {
  background: #09090b;
  color: #ffffff;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 3px
}

.clause-txt {
  font-size: 13.5px;
  line-height: 1.8;
  color: #18181b;
  text-align: justify;
  padding-left: 0.5rem
}

.clause-txt.hl {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 1rem;
  font-family: 'Geist Mono', monospace;
  font-size: 12.5px;
  color: #92400e;
  text-align: left
}

.sig-sec {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e4e4e7
}

.sig-top {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #71717a;
  text-align: center;
  margin-bottom: 3rem
}

.sig-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem
}

.sig-role {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d4af37;
  margin-bottom: 3.5rem
}

.sig-line {
  border-top: 1.5px solid #09090b;
  padding-top: 8px
}

.sig-name {
  font-family: var(--font-serif);
  font-size: 15px;
  color: #09090b;
  margin-bottom: 4px
}

.sig-label {
  font-size: 12px;
  color: #52525b
}

.doc-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e4e4e7;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #71717a;
  font-family: 'Geist Mono', monospace
}

/* ══════════════════════════════════════
   AUTH PAGES
══════════════════════════════════════ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem 2rem;
  background: var(--bg);
  background-image: radial-gradient(ellipse 60% 60% at 50% 0%, var(--goldglow) 0%, transparent 70%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 3rem;
  backdrop-filter: blur(20px);
}

.auth-logo {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--text);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 10px
}

.auth-logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0
}

.auth-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 8px
}

.auth-sub {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 2.5rem;
  font-weight: 300
}

.auth-field {
  margin-bottom: 1.25rem
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 8px
}

.auth-field input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.auth-field input:focus {
  border-color: var(--gold);
  background: var(--bg2);
}

.auth-field input::placeholder {
  color: var(--text3)
}

.auth-submit {
  width: 100%;
  padding: 14px;
  border-radius: 100px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  transition: all 0.2s;
  margin-top: 1rem;
}

.auth-submit:hover {
  background: var(--gold2);
  transform: translateY(-1px);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 1.5rem 0;
  font-size: 13px;
  color: var(--text3);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border)
}

.auth-link {
  font-size: 14px;
  color: var(--text2);
  text-align: center;
  margin-top: 1.5rem
}

.auth-link a {
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-link a:hover {
  color: var(--gold2)
}

.auth-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
  margin-bottom: 10px;
}

.auth-social:hover {
  border-color: var(--border2);
  background: var(--surface);
}

.auth-terms {
  font-size: 12px;
  color: var(--text3);
  text-align: center;
  margin-top: 1.5rem;
  line-height: 1.6
}

.auth-terms a {
  color: var(--text2);
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.auth-terms a:hover {
  color: var(--text);
}

/* ══════════════════════════════════════
   PRICING PAGE
══════════════════════════════════════ */
#page-pricing {
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 40% at 50% 0%, var(--goldglow) 0%, transparent 60%);
}

.pricing-hero {
  max-width: 700px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  text-align: center
}

.pricing-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(42px, 6vw, 72px);
  margin-bottom: 1.25rem;
  line-height: 1
}

.pricing-hero p {
  font-size: 18px;
  color: var(--text2);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 3rem
}

.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 5rem
}

.toggle-label {
  font-size: 14px;
  color: var(--text2);
  transition: color 0.2s;
}

.toggle-label.active-label {
  color: var(--text);
  font-weight: 500
}

.toggle {
  width: 52px;
  height: 28px;
  border-radius: 100px;
  background: var(--bg3);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle.on {
  background: var(--gold);
  border-color: var(--gold)
}

.toggle-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle.on .toggle-thumb {
  left: 26px
}

.annual-badge {
  background: var(--goldglow);
  color: var(--gold2);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.pricing-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
  padding: 0 2rem;
}

.plan-card {
  background: var(--surface);
  padding: 3rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r3);
  backdrop-filter: blur(10px);
}

.plan-card.featured {
  background: var(--surface-hover);
  position: relative;
  border-color: var(--border2);
  transform: scale(1.02);
}

.plan-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.plan-badge.pop {
  background: var(--goldglow);
  color: var(--gold2);
  border: 1px solid rgba(212, 175, 55, 0.2)
}

.plan-badge.free {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.2)
}

.plan-badge.ent {
  background: var(--surface-hover);
  color: var(--text2);
  border: 1px solid var(--border)
}

.plan-name {
  font-family: var(--font-serif);
  font-size: 26px;
  margin-bottom: 10px;
  color: var(--text)
}

.plan-price {
  margin-bottom: 2rem
}

.plan-price .amount {
  font-family: var(--font-serif);
  font-size: 56px;
  color: var(--text)
}

.plan-price .per {
  font-size: 15px;
  color: var(--text3);
  margin-left: 4px
}

.plan-price .orig {
  font-size: 15px;
  color: var(--text3);
  text-decoration: line-through;
  margin-left: 8px
}

.plan-desc {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 2rem;
  line-height: 1.6;
  font-weight: 300
}

.plan-cta {
  width: 100%;
  padding: 14px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  transition: all 0.2s;
  margin-bottom: 2.5rem;
}

.plan-cta.primary-cta {
  background: var(--text);
  color: var(--bg)
}

.plan-cta.primary-cta:hover {
  background: var(--gold2);
  transform: translateY(-1px);
}

.plan-cta.ghost-cta {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border)
}

.plan-cta.ghost-cta:hover {
  border-color: var(--border2);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.plan-features {
  border-top: 1px solid var(--border);
  padding-top: 2rem
}

.plan-features h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.5rem
}

.feat-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text2);
  line-height: 1.5
}

.feat-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-top: 1px
}

.feat-icon.yes {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green)
}

.feat-icon.no {
  background: var(--surface-hover);
  color: var(--text3)
}

.faq-section {
  max-width: 760px;
  margin: 5rem auto;
  padding: 0 2rem 5rem
}

.faq-section h2 {
  font-family: var(--font-serif);
  font-size: 36px;
  text-align: center;
  margin-bottom: 3rem
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  cursor: pointer
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text)
}

.faq-a {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  font-weight: 300;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease
}

.faq-item.open .faq-a {
  max-height: 300px;
  padding-top: 1rem
}

.faq-arrow {
  transition: transform 0.3s;
  color: var(--text3);
  font-size: 20px;
  font-weight: 300;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
  color: var(--text);
}

/* ══════════════════════════════════════
   TERMS PAGE
══════════════════════════════════════ */
#page-terms {
  background: var(--bg)
}

.terms-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 5rem 2rem 7rem
}

.terms-header {
  margin-bottom: 4rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border)
}

.terms-header h1 {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  margin-bottom: 12px
}

.terms-header .meta {
  font-size: 13px;
  color: var(--text3);
  font-family: var(--font-mono)
}

.terms-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 2rem;
  margin-bottom: 3rem;
}

.terms-toc h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.5rem
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.toc-list a {
  font-size: 14px;
  color: var(--text2);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

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

.terms-section {
  margin-bottom: 3.5rem
}

.terms-section h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border)
}

.terms-section p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-weight: 300
}

.terms-section ul {
  list-style: none;
  margin-bottom: 1.25rem;
  padding-left: 0
}

.terms-section ul li {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.7;
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 8px;
  font-weight: 300
}

.terms-section ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold)
}

.terms-highlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.terms-highlight p {
  margin-bottom: 0;
  font-size: 14px
}

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg3);
  color: var(--text);
  padding: 14px 24px;
  border-radius: 100px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0)
}

/* responsive hint */
@media(max-width:900px) {

  .features-grid,
  .templates-showcase {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .plan-card.featured {
    transform: none;
  }

  .stats-bar {
    flex-direction: column;
    background: transparent;
    border: none;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 4px;
    border-radius: var(--r);
  }

  .stat-item:first-child {
    border-top: 1px solid var(--border);
  }

  .stat-item:last-child {
    border-bottom: 1px solid var(--border)
  }

  #contract-doc {
    width: 100%;
    padding: 40px 32px
  }

  .sidebar {
    width: 280px;
    min-width: 280px
  }
}

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  transition: all 0.2s;
  width: 34px;
  height: 34px;
}

.theme-toggle:hover {
  background: var(--surface-hover);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

[data-theme="dark"] .sun-icon {
  display: none;
}

:root:not([data-theme="dark"]) .moon-icon {
  display: none;
}