:root {
  --bg: #0d1b2a;
  --bg-soft: #1b263b;
  --surface: #1b263b;
  --surface-2: #223049;
  --text: #e0e1dd;
  --text-muted: #a8b2c1;
  --accent: #ffb703;
  --accent-soft: #ffc84a;
  --border: #2d3a52;
  --success: #4ade80;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0,0,0,0.25);
  --max: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.site-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 8px;
  padding: 4px;
}
.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.nav a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.nav a:hover { color: var(--text); text-decoration: none; }

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 60px 0 40px;
}
.hero-text .eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}
.hero h1 {
  font-size: 44px;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--text);
}
.hero .lead {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 0 24px;
  max-width: 560px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { display: flex; justify-content: center; }
.hero-svg { width: 100%; max-width: 400px; height: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #0d1b2a;
}
.btn-primary:hover { background: var(--accent-soft); color: #0d1b2a; }
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.section-head { margin: 40px 0 24px; }
.section-head h2 {
  font-size: 28px;
  margin: 0 0 8px;
}
.section-head p {
  color: var(--text-muted);
  margin: 0;
  max-width: 680px;
}

.reader {
  margin-top: 20px;
}
.reader-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: start;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.pattern-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.pattern-card:hover { border-color: var(--accent); }
.pattern-card.is-active {
  border-color: var(--accent);
  background: var(--surface-2);
}
.pattern-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.pattern-svg { width: 100%; height: auto; max-height: 140px; }
.pattern-name {
  font-size: 13px;
  color: var(--text);
  text-align: center;
  font-weight: 500;
}

.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
}
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.result-tag {
  background: var(--accent);
  color: #0d1b2a;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-date {
  color: var(--text-muted);
  font-size: 12px;
}
.result-card h3 {
  font-size: 22px;
  margin: 0 0 8px;
}
.result-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.result-block h4 {
  font-size: 14px;
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-block p, .result-block ol, .result-block ul {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}
.result-block ol, .result-block ul {
  padding-left: 20px;
}
.result-block li { margin-bottom: 4px; }
.pain-list li::marker { color: var(--accent); }
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.result-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--success);
  min-height: 18px;
}

.patterns { margin-top: 40px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.gallery-card h3 {
  font-size: 16px;
  margin: 8px 0 6px;
}
.gallery-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}
.gallery-svg { width: 100%; height: auto; }

.pain-map { margin-top: 40px; }
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.pain-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--accent);
}
.pain-card p { margin: 0 0 8px; color: var(--text-muted); font-size: 14px; }
.pain-pattern {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.pain-pattern strong { color: var(--text); }

.shoes { margin-top: 40px; }
.shoe-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.shoe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.shoe-card h3 {
  font-size: 16px;
  margin: 0 0 10px;
  color: var(--accent);
}
.shoe-card ul {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.shoe-card li { margin-bottom: 4px; }
.shoe-note {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin: 0;
}
.shoe-tips {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.shoe-tips h3 { margin: 0 0 10px; font-size: 16px; }
.shoe-tips ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.shoe-tips li { margin-bottom: 6px; }

.red-flags { margin-top: 40px; }
.flag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.flag-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius);
  padding: 18px;
}
.flag-card h3 { font-size: 16px; margin: 0 0 8px; }
.flag-card p { margin: 0; color: var(--text-muted); font-size: 14px; }

.history { margin-top: 40px; }
.history-empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
}
.history-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.history-item h3 { margin: 0 0 4px; font-size: 16px; }
.history-item p { margin: 0; color: var(--text-muted); font-size: 14px; }
.history-item .history-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.history-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.content { margin-top: 40px; }
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.content-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--accent);
}
.content-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}
.content-scenario,
.content-faq,
.content-assumptions {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.content-scenario h3,
.content-faq h3,
.content-assumptions h3 {
  margin: 0 0 10px;
  font-size: 16px;
}
.content-scenario p,
.content-assumptions p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 10px;
}
.content-faq dl { margin: 0; }
.content-faq dt {
  font-weight: 600;
  margin-top: 12px;
  color: var(--text);
}
.content-faq dd {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer {
  margin-top: 60px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 40px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 24px;
}
.footer-brand {
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}
.footer-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}
.footer-title {
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-list li { margin-bottom: 6px; }
.footer-list a {
  color: var(--text-muted);
  font-size: 14px;
}
.footer-list a:hover { color: var(--accent); }
.footer-legal {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 40px 0 20px; }
  .hero h1 { font-size: 34px; }
  .reader-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .pain-grid { grid-template-columns: repeat(2, 1fr); }
  .shoe-grid { grid-template-columns: 1fr; }
  .flag-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav { gap: 12px; }
  .nav a { font-size: 13px; }
  .hero h1 { font-size: 28px; }
  .hero .lead { font-size: 16px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
  .pain-grid { grid-template-columns: 1fr; }
  .flag-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .result-card { position: static; }
}



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