:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --ink: #2b2620;
  --ink-soft: #6b6257;
  --accent: #b3552e;
  --accent-soft: #f3e0d5;
  --teal: #1f6f6b;
  --teal-soft: #dcecea;
  --line: #e5dccd;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(60, 45, 25, 0.07);
  --shadow-lift: 0 8px 28px rgba(60, 45, 25, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, #1f6f6b 0%, #174f4c 100%);
  color: #f6f1e7;
  padding: 64px 24px 56px;
  text-align: center;
}
.hero-inner { max-width: 760px; margin: 0 auto; }
.compass-mark { font-size: 44px; margin-bottom: 8px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0 0 12px; }
.tagline {
  font-size: 1.08rem;
  color: #d9e7e2;
  margin: 0 auto;
  max-width: 560px;
}

/* ---------- Layout ---------- */
main { max-width: 880px; margin: 0 auto; padding: 48px 20px 80px; }
.journey-intro { text-align: center; margin-bottom: 48px; }
.journey-intro h2 { font-size: 1.8rem; margin-bottom: 8px; }
.journey-intro p { color: var(--ink-soft); max-width: 620px; margin: 0 auto; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 56px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--teal), var(--accent));
  opacity: 0.35;
}

.stage { position: relative; margin-bottom: 28px; }
.stage-node {
  position: absolute;
  left: -56px;
  top: 6px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--teal);
  color: var(--teal);
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
}
.stage.open .stage-node {
  background: var(--teal);
  color: #fff;
}

.stage-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}
.stage-card:hover { box-shadow: var(--shadow-lift); }

.stage-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.stage-header h3 { margin: 0 0 4px; font-size: 1.3rem; }
.stage-sub { color: var(--ink-soft); font-size: 0.92rem; }
.chevron {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--accent);
  transition: transform 0.25s ease;
}
.stage.open > .stage-card > .stage-header .chevron { transform: rotate(180deg); }

.stage-body { display: none; padding: 0 24px 20px; }
.stage.open .stage-body { display: block; animation: fadeIn 0.25s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 4px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
}
.faq-question::before {
  content: "?";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.faq.open .faq-question { color: var(--accent); }

.faq-body { display: none; padding: 4px 4px 22px 32px; }
.faq.open .faq-body { display: block; animation: fadeIn 0.25s ease; }

/* ---------- Workflow ---------- */
.workflow { margin: 0 0 18px; }
.workflow-title {
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 10px;
}
.workflow ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.workflow li {
  counter-increment: step;
  position: relative;
  padding: 0 0 12px 38px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.workflow li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 600;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Form ---------- */
.skill-form { display: grid; gap: 14px; }
.field label {
  display: block;
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 5px;
}
.field input[type="text"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  font: inherit;
  color: var(--ink);
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
.field .hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; }

.field input[type="file"] { font-size: 0.9rem; }

.submit-btn {
  justify-self: start;
  padding: 11px 26px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.submit-btn:hover:not(:disabled) { background: #99451f; transform: translateY(-1px); }
.submit-btn:disabled { opacity: 0.55; cursor: wait; }

/* ---------- Result ---------- */
.result {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  background: #fffdf8;
  padding: 18px 20px;
  display: none;
}
.result.visible { display: block; }
.result .status {
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 8px;
}
.result .status.error { color: #b3382e; }
.result-content { font-size: 0.95rem; overflow-x: auto; }
.result-content h1, .result-content h2, .result-content h3 { font-size: 1.05rem; margin: 16px 0 6px; }
.result-content table {
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 0.88rem;
  width: 100%;
}
.result-content th, .result-content td {
  border: 1px solid var(--line);
  padding: 6px 10px;
  text-align: left;
}
.result-content th { background: var(--teal-soft); }
.result-content code {
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.85em;
}
.result-content pre {
  background: #f4efe4;
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
}
.result-content pre code { background: none; padding: 0; }
.result-content blockquote {
  margin: 10px 0;
  padding: 4px 14px;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--teal-soft);
  border-top-color: var(--teal);
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 6px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 20px 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
}
footer a { color: var(--teal); }

@media (max-width: 600px) {
  .timeline { padding-left: 44px; }
  .timeline::before { left: 17px; }
  .stage-node { left: -44px; width: 36px; height: 36px; font-size: 1rem; }
  .stage-header { padding: 16px 18px; }
  .stage-body { padding: 0 18px 16px; }
}
