:root {
  /* Appinger identity — moss, matching the portfolio gallery.
     --brand is the display moss used for the wordmark (large text only).
     --primary-color is a darker moss for links/buttons so small text
     clears WCAG AA (5.41:1 on white; the display moss is only 4.02:1). */
  --brand: #2e8f63;
  --primary-color: #267850;
  --secondary-color: #1c5b3d;
  --text-color: #1c221e;
  --text-light: #5f6a62;
  --bg-color: #ffffff;
  --bg-secondary: #f4f6f2;
  --border-color: #dde3dc;
  --success-color: #267850;
  --max-width: 1200px;
  --spacing: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4cc08a;
    --primary-color: #4cc08a;
    --secondary-color: #6fd3a4;
    --text-color: #e8ede9;
    --text-light: #92a098;
    --bg-color: #0f1512;
    --bg-secondary: #161d19;
    --border-color: #263029;
    --success-color: #4cc08a;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* Header */
header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-color);
  text-decoration: none;
}

/* "App" in ink, "inger" in moss — the family mark: every app is an -inger. */
.logo .inger {
  color: var(--brand);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

/* Main Content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.card p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.card a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.card a:hover {
  text-decoration: underline;
}

/* Content Pages */
.content-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.content-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.last-updated {
  color: var(--text-light);
  font-size: 0.9rem;
}

.content-section {
  margin-bottom: 2.5rem;
}

.content-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  margin-top: 2rem;
}

.content-section h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-color);
  margin-top: 1.5rem;
}

.content-section p {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.content-section ul,
.content-section ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-section li {
  margin-bottom: 0.5rem;
}

/* Table of Contents */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.toc h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.toc ul {
  list-style: none;
  margin-left: 0;
}

.toc a {
  color: var(--primary-color);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

.btn:disabled {
  background-color: var(--text-light);
  cursor: not-allowed;
}

/* Footer */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
}

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

.copyright {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  nav {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  nav.active {
    max-height: 500px;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
    padding-top: 1rem;
  }

  nav li {
    padding: 0.5rem 0;
  }

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

  .hero p {
    font-size: 1.1rem;
  }

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

  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .content-header h1 {
    font-size: 1.5rem;
  }
}

/* Tables — used on the data-deletion page. The table itself keeps normal
   table layout; the WRAPPER scrolls. Putting overflow on the table means
   display:block, which collapses the rows. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

.content-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 34rem;
}

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

.content-section table th {
  font-weight: 600;
  color: var(--text-color);
  background: var(--bg-secondary);
  white-space: nowrap;
}

.content-section table td {
  color: var(--text-light);
}

.content-section table tr:last-child td {
  border-bottom: none;
}
