:root {
  --primary: #3b82f6;
  --primary-soft: #e0edff;
  --primary-dark: #1d4ed8;
  --bg: #f3f4f6;
  --card-bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.06);
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Layout */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.section {
  padding: 40px 0 56px;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 24px;
}

/* Header */

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.logo-img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.logo-text {
  font-size: 1.1rem;
}

/* Nav */

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav a:hover {
  background-color: var(--primary-soft);
  color: var(--primary-dark);
}

.nav a.active {
  border-color: var(--primary);
  background-color: #eff6ff;
  color: var(--primary-dark);
}

/* Hero */

.hero {
  padding: 40px 0 56px;
}

.hero-inner {
  display: grid;
  gap: 24px;
}

.hero-text h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.hero-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-panel {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.hero-panel h2 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 12px;
}

.hero-grid {
  display: grid;
  gap: 10px;
}

/* Cards */

.card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 14px 14px 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid #e5e7f0;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link h3 {
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 1rem;
}

.card-link p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Steps */

.steps-grid {
  display: grid;
  gap: 16px;
}

.step-card {
  position: relative;
  padding-top: 24px;
}

.step-number {
  position: absolute;
  top: 10px;
  left: 14px;
  background-color: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
}

/* Page hero */

.page-hero {
  padding: 28px 0 16px;
}

.page-hero h1 {
  margin: 0 0 6px;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
}

/* Two-column layout */

.two-column {
  display: grid;
  gap: 24px;
}

/* Forms */

.form {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 18px 16px 20px;
  box-shadow: var(--shadow-soft);
}

.form-group,
.form-group-inline {
  margin-bottom: 14px;
}

.form-group-inline {
  display: grid;
  gap: 12px;
}

label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #4b5563;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font: inherit;
  background-color: #f9fafb;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

textarea {
  resize: vertical;
}

/* Pills */

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-group-wrap {
  row-gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  cursor: pointer;
  background-color: #f9fafb;
}

.pill input {
  accent-color: var(--primary);
}

.pill:hover {
  border-color: var(--primary);
  background-color: var(--primary-soft);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-secondary {
  background-color: #e5edff;
  color: var(--primary-dark);
}

.btn-secondary:hover {
  background-color: #d4e1ff;
}

/* Lists & side panels */

.simple-list {
  padding-left: 18px;
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.small-text {
  font-size: 0.8rem;
  color: var(--muted);
}

.side-panel {
  align-self: start;
}

/* Wiki grid */

.wiki-grid {
  display: grid;
  gap: 16px;
}

/* --- ADDED WIKI FIX --- */
.wiki-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.wiki-card {
  height: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.wiki-card:hover {
  border-color: var(--primary);
  transition: 0.15s ease;
}

/* Form message */

.form-message {
  margin-top: 8px;
  font-size: 0.85rem;
}

/* Footer */

.site-footer {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  background-color: #ffffff;
}

.footer-inner {
  padding: 12px 0;
  text-align: center;
}

.footer-small {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Responsive */

@media (min-width: 720px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
  }

  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .two-column {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }

  .form-group-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wiki-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
