/* Layoff Survival Money Moves Guide */
:root {
  --bg: #f6f1e7;
  --bg-2: #efe7d5;
  --ink: #2a2620;
  --muted: #5d5549;
  --line: #d8cdb4;
  --accent: #8a4b2e;
  --accent-2: #b5683a;
  --green: #4a6b3f;
  --green-bg: #dfe8d7;
  --red: #8c2f2f;
  --red-bg: #f6e1df;
  --amber: #a9742c;
  --amber-bg: #f6ecd5;
  --card: #fffaf0;
  --shadow: 0 1px 2px rgba(42,38,32,.06), 0 6px 24px rgba(42,38,32,.08);
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.site-header .wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
}
.brand-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px 10px;
  border-bottom: 2px solid #fff;
}
nav.primary-nav {
  display: flex;
  gap: 22px;
  font-size: 0.95rem;
}
nav.primary-nav a { color: var(--muted); }
nav.primary-nav a:hover { color: var(--accent); text-decoration: none; }

/* Hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 24px;
}
.hero h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.hero .lede {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 720px;
  margin: 0 0 18px;
}
.hero-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
}
.hero-meta span::before {
  content: "• ";
  color: var(--accent);
}

/* Layout */
.workspace {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 960px) {
  .workspace { grid-template-columns: 1fr; }
}

/* Cards */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.panel h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}
.panel h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Form */
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.95rem;
}
.field .hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--ink);
  font-family: inherit;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) {
  .field-row { grid-template-columns: 1fr; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease;
}
.btn:hover { background: var(--accent-2); }
.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn.secondary:hover { background: rgba(138,75,46,.08); }
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.btn.ghost:hover { color: var(--ink); border-color: var(--ink); }
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Summary */
.summary {
  position: sticky;
  top: 24px;
}
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-bottom: 16px;
}
.stat {
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.stat .k {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.stat .v {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}
.stat.runway .v { color: var(--accent); }
.badge {
  display: inline-block;
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--amber-bg);
  color: var(--amber);
  font-weight: 600;
  margin-top: 8px;
}
.badge.tight { background: var(--red-bg); color: var(--red); }
.badge.ok { background: var(--green-bg); color: var(--green); }

/* Checklist */
.moves-list {
  margin-top: 8px;
}
.move {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.move:last-child { border-bottom: none; }
.move .step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.move h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.move p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}
.move .time {
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--bg-2);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Scenario timeline */
.timeline {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.timeline .tl-item {
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}
.timeline .tl-item .when {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}
.timeline .tl-item p { margin: 4px 0 0; color: var(--muted); font-size: 0.93rem; }

/* Mistakes */
.mistake {
  background: var(--red-bg);
  border: 1px solid #eecfca;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 0.93rem;
}
.mistake strong { color: var(--red); }

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--bg-2);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq details[open] summary { margin-bottom: 6px; color: var(--accent); }
.faq details p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* Content sections */
.content-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.content-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.content-card h3 { margin-top: 0; font-size: 1.1rem; color: var(--accent); }
.content-card p { color: var(--muted); margin-bottom: 0; }

/* Steps */
.steps-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps-list li {
  counter-increment: step;
  position: relative;
  padding: 12px 0 12px 44px;
  border-bottom: 1px dashed var(--line);
}
.steps-list li:last-child { border-bottom: none; }
.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  margin-top: 48px;
  padding: 24px;
}
.site-footer .wrap {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* Print */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .btn-row, .summary-actions, nav.primary-nav, .no-print { display: none !important; }
  .workspace { display: block; }
  .panel { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .move .step { background: #000; color: #fff; }
}

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

/* Empty state */
.empty-state {
  color: var(--muted);
  font-style: italic;
  padding: 12px;
  text-align: center;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 10;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

/* Preset chips */
.presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.preset {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, color .15s ease;
}
.preset:hover { background: var(--accent); color: #fff; border-color: var(--accent); }



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