/* Lease Clause Spotter — styles.css */

:root {
  --blue-700: #1D4ED8;
  --blue-600: #2563EB;
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --amber-500: #F59E0B;
  --amber-50: #FFFBEB;
  --red-600: #DC2626;
  --red-50: #FEF2F2;
  --green-600: #16A34A;
  --green-50: #F0FDF4;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50: #F9FAFB;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; color: var(--blue-700); }

img, svg { display: block; max-width: 100%; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--blue-600);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gray-900);
}
.logo:hover, .logo:focus-visible { text-decoration: none; color: var(--gray-900); }
.main-nav { display: flex; gap: 24px; }
.main-nav a { font-size: .9rem; font-weight: 500; color: var(--gray-600); }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--blue-700); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--blue-700) 0%, #1E40AF 50%, #1E3A8A 100%);
  color: var(--white);
  padding: 80px 0;
}
.hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero-sub { font-size: 1.15rem; opacity: .9; max-width: 560px; margin-bottom: 32px; line-height: 1.5; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-note { font-size: .85rem; opacity: .7; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s ease;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover, .btn:focus-visible { text-decoration: none; }
.btn-primary { background: var(--amber-500); color: var(--gray-900); border-color: var(--amber-500); }
.btn-primary:hover, .btn-primary:focus-visible { background: #D97706; border-color: #D97706; color: var(--gray-900); }
.btn-secondary { background: rgba(255,255,255,.15); color: var(--white); border-color: rgba(255,255,255,.3); }
.btn-secondary:hover, .btn-secondary:focus-visible { background: rgba(255,255,255,.25); color: var(--white); }
.btn-ghost { background: transparent; color: var(--gray-600); border-color: var(--gray-300); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--gray-100); color: var(--gray-900); }
.btn-danger { background: transparent; color: var(--red-600); border-color: var(--red-600); }
.btn-danger:hover, .btn-danger:focus-visible { background: var(--red-50); }
.review-section .btn-secondary { background: var(--white); color: var(--blue-600); border-color: var(--blue-600); }
.review-section .btn-secondary:hover { background: var(--blue-50); }

/* How it works */
.how-section { padding: 72px 0; background: var(--white); }
.how-section h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 40px; text-align: center; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step-card {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 16px;
}
.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: .9rem; color: var(--gray-600); line-height: 1.5; }

/* Review section */
.review-section { padding: 56px 0; }
.review-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.review-main h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.review-intro { color: var(--gray-600); margin-bottom: 32px; max-width: 680px; }

.lease-meta { margin-bottom: 28px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-weight: 600; font-size: .85rem; color: var(--gray-700); }
.field-hint { font-size: .8rem; color: var(--gray-500); }
input[type="text"], textarea {
  font-family: inherit;
  font-size: .9rem;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-900);
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
textarea { resize: vertical; }

.clause-group {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.clause-group legend {
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.legend-count {
  font-size: .75rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 99px;
}
.group-desc { font-size: .85rem; color: var(--gray-600); margin-bottom: 12px; }
.clause-items { display: flex; flex-direction: column; gap: 4px; }
.clause-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .12s ease;
}
.clause-item:hover { background: var(--gray-50); }
.clause-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--blue-600);
  flex-shrink: 0;
}
.clause-text { font-size: .9rem; line-height: 1.4; }
.clause-item[data-checked="true"] .clause-text { color: var(--green-600); }
.clause-danger { border-left: 3px solid transparent; }
.clause-danger:hover { background: var(--red-50); }
.clause-danger[data-checked="true"] { background: var(--red-50); border-left-color: var(--red-600); }
.clause-notes { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-200); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--gray-200);
}

/* Sidebar */
.review-sidebar { position: relative; }
.sidebar-sticky {
  position: sticky;
  top: 80px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.sidebar-sticky h3 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }

.progress-ring {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
}
.progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.progress-text span:first-child { font-size: 1.4rem; font-weight: 800; }
.progress-label { font-size: .7rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; }

.flag-summary { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.flag-stat { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 500; }
.flag-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.flag-high .flag-dot { background: var(--red-600); }
.flag-medium .flag-dot { background: var(--amber-500); }
.flag-low .flag-dot { background: var(--green-600); }
.flag-missing .flag-dot { background: var(--gray-300); }

.landlord-questions { margin-bottom: 24px; }
.landlord-questions h4 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); margin-bottom: 10px; }
.landlord-questions ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.landlord-questions li { font-size: .82rem; line-height: 1.4; color: var(--gray-700); padding: 8px 12px; background: var(--blue-50); border-radius: var(--radius-sm); border-left: 3px solid var(--blue-600); }
.landlord-questions li.empty-state { background: var(--gray-50); border-left-color: var(--gray-300); color: var(--gray-500); font-style: italic; }

.saved-reviews h4 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); margin-bottom: 10px; }
.saved-reviews ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.saved-reviews li { font-size: .82rem; }
.saved-reviews li.empty-state { color: var(--gray-500); font-style: italic; }
.saved-reviews a { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: var(--radius-sm); }
.saved-reviews a:hover { background: var(--gray-100); text-decoration: none; }

/* Scenarios */
.scenarios-section { padding: 72px 0; background: var(--white); }
.scenarios-section h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; text-align: center; }
.section-intro { text-align: center; color: var(--gray-600); margin-bottom: 40px; }
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.scenario-card {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}
.scenario-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.scenario-card p { font-size: .88rem; color: var(--gray-600); line-height: 1.55; }

/* Mistakes */
.mistakes-section { padding: 72px 0; }
.mistakes-section h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 40px; text-align: center; }
.mistakes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.mistake-card {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.mistake-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; color: var(--red-600); }
.mistake-card p { font-size: .88rem; color: var(--gray-600); line-height: 1.55; }

/* FAQ */
.faq-section { padding: 72px 0; background: var(--white); }
.faq-section h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 32px; text-align: center; }
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 4px; }
.faq-list details {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-list summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--gray-400);
  transition: transform .2s ease;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details[open] summary { border-bottom: 1px solid var(--gray-200); }
.faq-list details p { padding: 16px 20px; font-size: .9rem; color: var(--gray-600); line-height: 1.55; }

/* Footer */
.site-footer { background: var(--gray-900); color: var(--gray-400); padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 20px; align-items: center; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--white); }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { font-size: .85rem; color: var(--gray-400); }
.footer-nav a:hover, .footer-nav a:focus-visible { color: var(--white); }
.footer-copy { font-size: .78rem; color: var(--gray-500); max-width: 480px; }

/* Print */
@media print {
  .site-header, .site-footer, .review-sidebar, .hero-actions, .hero-note, .form-actions, .how-section, .scenarios-section, .mistakes-section, .faq-section { display: none !important; }
  .hero { padding: 20px 0; background: none; color: #000; }
  .hero h1 { color: #000; font-size: 1.5rem; }
  .hero-sub { color: #333; }
  .review-section { padding: 0; }
  .review-layout { display: block; }
  .clause-group { break-inside: avoid; box-shadow: none; border-color: #ccc; }
  .clause-item { padding: 4px 8px; }
  body { background: #fff; font-size: 11pt; }
}

/* Responsive */
@media (max-width: 900px) {
  .review-layout { grid-template-columns: 1fr; }
  .review-sidebar { order: -1; }
  .sidebar-sticky { position: static; }
  .hero { padding: 56px 0; }
  .hero h1 { font-size: 1.8rem; }
}
@media (max-width: 600px) {
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; gap: 8px; }
  .main-nav { gap: 14px; }
  .hero-actions { flex-direction: column; }
  .form-actions { flex-direction: column; }
  .btn { width: 100%; }
  .steps-grid, .scenario-grid, .mistakes-grid { grid-template-columns: 1fr; }
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
