/* Custom Modern Dark Theme */
:root {
  --bg: #16151a;
  --surface: #1e1d24;
  --surface-2: #262530;
  --border: #34313d;
  --text: #f2efe9;
  --text-muted: #9c97a8;
  --accent: #c9a24b;
  --accent-soft: rgba(201, 162, 75, 0.14);
  --accent-2: #5b7b7a;
  --danger: #c1595a;

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 0.625rem;
  --radius-sm: 0.375rem;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --hit: 2.75rem; /* minimum interactive target size */
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessible Focus Outlines */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

ul {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 600;
  line-height: 2;
  margin-bottom: 1.5rem;
  margin-left: 1.5rem;
  list-style: none;
}


p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

code, pre, kbd {
  font-family: var(--font-mono);
  background-color: var(--surface-2);
  border-radius: var(--radius-sm);
}

code {
  padding: 0.2rem 0.4rem;
  font-size: 0.9em;
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Interactive Elements & Touch Targets */
button, 
.btn,
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--hit);
  min-width: var(--hit);
  padding: 0 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: #100f12;
  background-color: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

button:hover,
.btn:hover {
  background-color: #d1ad56;
}

button.btn-secondary {
  background-color: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

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

button.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

/* Forms & Inputs */
input, select, textarea {
  min-height: var(--hit);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.875rem;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background-color: var(--surface-2);
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

footer {
  margin-top: auto;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--text-muted);
}

/* Card Components */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}

.card-highlight {
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.grid-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-sidebar {
    grid-template-columns: 280px 1fr;
  }
}