/* Small Business Credit Builder - Styles */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --background: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --node-fill: #3b82f6;
  --node-fill-complete: #10b981;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

header .tagline {
  font-size: 0.95rem;
  opacity: 0.95;
  margin-bottom: 1rem;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
  font-size: 0.9rem;
}

nav a:hover {
  background-color: rgba(255,255,255,0.1);
}

main {
  flex: 1;
  padding: 2rem 0;
}

section {
  background: var(--card-bg);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}

section + section {
  margin-top: 1.5rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
  line-height: 1.3;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.intro p {
  margin-bottom: 1rem;
  color: var(--secondary);
}

.intro p:last-child {
  margin-bottom: 0;
}

.planner-section {
  padding: 1.5rem;
}

.planner-section h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.preset-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.preset-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: white;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.preset-btn:hover {
  background: var(--background);
  border-color: var(--primary);
}

.preset-btn.active,
.preset-btn[aria-pressed="true"] {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.timeline-container {
  overflow-x: auto;
  padding: 1rem 0;
}

.timeline {
  display: flex;
  gap: 1.5rem;
  min-width: 800px;
}

.timeline-node {
  flex: 1;
  min-width: 180px;
  position: relative;
  padding-top: 2rem;
}

.timeline-node:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--border);
}

.node-marker {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  transition: transform 0.2s;
}

.node-marker:hover {
  transform: translateX(-50%) scale(1.1);
}

.node-marker svg circle {
  transition: fill 0.2s;
}

.node-marker:hover svg circle {
  fill: var(--primary);
}

.node-content {
  background: var(--card-bg);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}

.node-content h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.node-date {
  font-size: 0.85rem;
  color: var(--secondary);
  margin-bottom: 0.75rem;
}

.node-description {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.node-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.milestone-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.action-btn {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.vendor-suggestions {
  margin-top: 1.5rem;
}

.vendor-intro {
  font-size: 0.95rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.vendor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.vendor-table th,
.vendor-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.vendor-table th {
  background: var(--background);
  font-weight: 600;
  color: var(--text);
}

.vendor-table tr:hover {
  background: var(--background);
}

.vendor-table td:first-child {
  font-weight: 500;
}

.progress-section {
 padding: 1.5rem;
}

.progress-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.progress-item {
  background: var(--background);
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: center;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--secondary);
  display: block;
  margin-bottom: 0.25rem;
}

.progress-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.export-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.export-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  flex: 1;
  min-width: 120px;
}

.export-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.business-info-section {
 padding: 1.5rem;
}

business-form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-row label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.form-row input,
.form-row select {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-row input:focus,
.form-row select:focus {
 outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 231, 0.2);
}

footer {
  background: var(--text);
  color: white;
  padding: 1.5rem 0;
  margin-top: auto;
}

footer p {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

footer small {
  opacity: 0.8;
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }

  nav a {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
  }

  .planner-section h2,
  .progress-section h2,
  .business-info-section h2 {
    font-size: 1.2rem;
  }

  .timeline {
    min-width: 600px;
    font-size: 0.85rem;
  }

  .node-content {
    padding: 0.75rem;
  }

  .vendor-table {
    font-size: 0.8rem;
  }

  .vendor-table th,
  .vendor-table td {
    padding: 0.5rem;
  }

  .export-controls {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .timeline {
    min-width: auto;
    flex-direction: column;
  }

  .timeline::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--border);
  }

  .timeline-node {
    min-width: auto;
    flex: none;
    width: 100%;
    padding-top: 2rem;
    margin-left: 40px;
  }

  .node-marker {
    left: -20px;
  }

  .node-content {
    margin-left: 40px;
  }
}

/* Animation utilities */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-node {
  animation: fadeInUp 0.3s ease-out var(--delay, 0ms) backwards;
}

.timeline-node:first-child {
  animation-delay: 0ms;
}

.timeline-node:nth-child(2) {
  animation-delay: 100ms;
}

.timeline-node:nth-child(3) {
  animation-delay: 200ms;
}

.timeline-node:nth-child(4) {
  animation-delay: 300ms;
}

.timeline-node:nth-child(5) {
  animation-delay: 400ms;
}


/* 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;
}
