/* Cooperative Business Startup Kit - main styles */
:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --text: #1e1b18;
  --text-muted: #5c554d;
  --border: #ddd6cc;
  --primary: #2d5a3d;
  --primary-hover: #234a31;
  --secondary: #e8e2d8;
  --secondary-hover: #dcd3c5;
  --accent: #c46a2d;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}

.brand svg {
  color: var(--primary);
}

.main-nav {
  display: flex;
  gap: 20px;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--primary);
}

/* Hero */
.hero {
  padding: 60px 0 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-secondary {
  background: var(--secondary);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--secondary-hover);
}

.hero-note {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-note-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.note-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.note-value {
  font-weight: 600;
}

/* Sections */
.worksheet-section,
.comparison-section,
.guide-section {
  padding: 50px 0;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.section-heading p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Worksheet layout */
.worksheet-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  align-items: start;
}

.controls-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.controls-panel label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

.controls-panel select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.preset-cards {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.preset-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s, background 0.2s;
}

.preset-card.active {
  border-color: var(--primary);
  background: #f0f5f1;
}

.preset-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-message {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 20px;
}

.output-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  min-height: 400px;
}

/* Output content styles */
.output-content h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.output-content h4 {
  font-size: 1.1rem;
  margin: 16px 0 8px;
}

.output-content ul,
.output-content ol {
  margin-left: 20px;
  margin-bottom: 12px;
}

.output-content li {
  margin-bottom: 6px;
}

.output-content p {
  margin-bottom: 10px;
}

.output-content .template-box {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  white-space: pre-wrap;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* Comparison table */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table thead th {
  background: var(--secondary);
  font-weight: 600;
}

.comparison-table tbody th {
  font-weight: 500;
  background: #f7f4ef;
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
  border-bottom: none;
}

/* Guide */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-bottom: 30px;
}

.guide-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.guide-block h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.guide-block p,
.guide-block li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.guide-block ul {
  margin-left: 20px;
}

.guide-faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.guide-faq h3 {
  margin-bottom: 15px;
}

.guide-faq details {
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.guide-faq summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--primary);
}

.guide-faq p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 25px 0;
  margin-top: 30px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-inner p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .worksheet-layout {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 10px 0;
    gap: 8px;
  }

  .main-nav {
    gap: 12px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}



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