/* Dev Logic — Design system (dark theme) */
:root {
  --bg-page: #0f1419;
  --bg-surface: #1a222d;
  --bg-card: #232d3a;
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #0047ab;
  --accent-hover: #003d99;
  --accent-muted: rgba(0, 71, 171, 0.2);
  --border: rgba(148, 163, 184, 0.12);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --radius: 8px;
  --max-width: 1100px;
  --section-padding-y: 4rem;
  --nav-height: 4rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Focus rings for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1:focus {
  outline: none;
}

/* Layout */
.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
}

/* Typography */
h1, h2, h3, h4 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.text-muted { color: var(--text-muted); }
.text-primary { color: var(--text-primary); }

/* Buttons / CTAs */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

/* Lists */
ul.unstyled {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

ul.unstyled li {
  margin-bottom: 0.5rem;
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-secondary);
}

ul.unstyled li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Blazor validation */
.valid.modified:not([type=checkbox]) {
  outline: 1px solid #26b050;
}

.invalid {
  outline: 1px solid #e50000;
}

.validation-message {
  color: #f87171;
}

/* Error UI */
#blazor-error-ui {
  background: #1e293b;
  border-top: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.6rem 1.25rem;
}

.blazor-error-boundary {
  background: #7f1d1d;
  color: white;
  padding: 1rem;
}

.darker-border-checkbox.form-check-input {
  border-color: var(--text-muted);
}

/* Sections */
.hero {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.hero-subhead {
  font-size: 1.125rem;
  max-width: 42rem;
  margin-bottom: 1.5rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.hero-note {
  font-size: 0.9rem;
}

.section-alt {
  background: var(--bg-surface);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-link a {
  color: inherit;
  text-decoration: none;
}

.card-link a:hover h3 {
  color: var(--accent);
}

.step-list {
  padding-left: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.step-list li {
  margin-bottom: 0.5rem;
}

.text-center {
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 0.5rem;
}

.cta-section .btn {
  margin-top: 0.5rem;
}

.insight-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.insight-card p {
  margin-bottom: 0.5rem;
}

.insight-meta {
  font-size: 0.875rem;
  margin: 0;
}

.insight-header {
  margin-bottom: 1.5rem;
}

.insight-body {
  color: var(--text-secondary);
  line-height: 1.7;
}

.insight-body h2 {
  font-size: 1.35rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.insight-body h3 {
  font-size: 1.15rem;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

.insight-body p {
  margin-bottom: 1rem;
}

.insight-body ul, .insight-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.insight-body code {
  background: var(--bg-card);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.insight-body pre {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1rem;
}

.insight-body pre code {
  padding: 0;
  background: none;
}

.approach-step {
  margin-bottom: 1.5rem;
}

.approach-step:last-of-type {
  margin-bottom: 2rem;
}
