:root {
  --bg-0: #08090b;
  --bg-1: #111316;
  --bg-2: #171a1f;
  --lead-0: #9ca3af;
  --lead-1: #d4d4d8;
  --lead-2: #f4f4f5;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.08);
  --orange: #f97316;
  --orange-strong: #fb923c;
  --orange-soft: rgba(249, 115, 22, 0.24);
  --ring: rgba(249, 115, 22, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  color: var(--lead-1);
  background-color: var(--bg-0);
  background-image:
    radial-gradient(900px 520px at 92% -8%, rgba(249, 115, 22, 0.2), transparent 60%),
    radial-gradient(720px 380px at -12% -10%, rgba(255, 255, 255, 0.07), transparent 65%),
    linear-gradient(160deg, #050607 0%, #0c0e12 45%, #0a0b0d 100%);
}

.hero {
  border: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    linear-gradient(180deg, rgba(249, 115, 22, 0.12), rgba(249, 115, 22, 0.02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 20px 55px rgba(0, 0, 0, 0.4);
}

.hero-icon {
  width: 1.2em;
  height: 1.2em;
  color: var(--orange-strong);
}

.accent-bar {
  height: 2px;
  width: min(360px, 100%);
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.9), rgba(249, 115, 22, 0.1));
}

.panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    var(--bg-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 35px rgba(0, 0, 0, 0.35);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.section-title svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--orange-strong);
}

.field {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(10, 11, 14, 0.88);
  padding: 0.72rem 0.9rem;
  color: var(--lead-2);
  outline: none;
}

.field::placeholder {
  color: rgba(212, 212, 216, 0.45);
}

.field-area {
  min-height: 96px;
  resize: vertical;
}

.field:focus {
  border-color: rgba(249, 115, 22, 0.85);
  box-shadow: 0 0 0 3px var(--ring);
}

select.field {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.45rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%23fdba74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.78rem center;
  background-size: 0.9rem;
}

.btn-primary {
  border: 1px solid rgba(251, 146, 60, 0.65);
  border-radius: 0.8rem;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff7ed;
  padding: 0.75rem 1rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 11px 25px rgba(249, 115, 22, 0.34);
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--bg-2);
  padding: 0.9rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.48rem;
}

.icon {
  width: 0.95rem;
  height: 0.95rem;
  color: #fdba74;
  flex: none;
}

.muted {
  color: var(--lead-0);
}

.badge {
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-high {
  background: rgba(251, 113, 133, 0.19);
  color: #fda4af;
}

.badge-medium {
  background: rgba(249, 115, 22, 0.22);
  color: #fdba74;
}

.badge-low {
  background: rgba(52, 211, 153, 0.18);
  color: #86efac;
}

.badge-planned {
  background: rgba(148, 163, 184, 0.22);
  color: #d4d4d8;
}

.badge-progress {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
}

.badge-done {
  background: rgba(74, 222, 128, 0.2);
  color: #86efac;
}

.btn-ghost {
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.01);
  color: #d4d4d8;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.btn-ghost:hover {
  border-color: rgba(249, 115, 22, 0.72);
  color: #fdba74;
  background: rgba(249, 115, 22, 0.12);
}

.anim-fall-burn {
  pointer-events: none;
  z-index: 2;
  transform-origin: 50% 50%;
  clip-path: inset(0 0 0 0);
  animation: burn-consume 1900ms cubic-bezier(0.24, 0.7, 0.2, 1) forwards;
}

.anim-fall-burn::before {
  content: "";
  position: absolute;
  top: -18%;
  bottom: -18%;
  right: -12%;
  width: 44%;
  background:
    radial-gradient(72% 65% at 70% 50%, rgba(255, 243, 206, 0.78), rgba(255, 145, 48, 0.78) 42%, rgba(255, 60, 0, 0.2) 75%, transparent 88%),
    radial-gradient(95% 82% at 95% 50%, rgba(255, 118, 22, 0.42), transparent 72%);
  mix-blend-mode: screen;
  pointer-events: none;
  filter: blur(0.25px);
  animation: burn-front 1900ms ease-out forwards;
}

.anim-fall-burn::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 8, 4, 0) 55%, rgba(26, 8, 0, 0.45) 72%, rgba(8, 3, 1, 0.92) 100%),
    linear-gradient(180deg, rgba(255, 188, 132, 0.14) 0%, rgba(28, 8, 0, 0.88) 100%);
  pointer-events: none;
  animation: burn-ash 1900ms ease forwards;
}

@keyframes burn-consume {
  0% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    filter: brightness(1) saturate(1);
  }

  22% {
    clip-path: inset(0 8% 0 0);
    opacity: 1;
    filter: brightness(1.15) saturate(1.12);
  }

  100% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
    filter: brightness(0.35) saturate(0.16) blur(1.6px);
  }
}

@keyframes burn-front {
  0% {
    transform: translateX(0) scaleY(0.9);
    opacity: 0.22;
  }

  20% {
    transform: translateX(-35%) scaleY(1.08);
    opacity: 1;
  }

  58% {
    transform: translateX(-145%) scaleY(0.94);
    opacity: 0.76;
  }

  100% {
    transform: translateX(-250%) scaleY(0.72);
    opacity: 0;
  }
}

@keyframes burn-ash {
  0% {
    clip-path: inset(0 0 0 0);
    opacity: 0;
  }

  20% {
    opacity: 0.88;
  }

  100% {
    clip-path: inset(0 100% 0 0);
    opacity: 0.08;
  }
}

.burn-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 5;
}

.burn-particle {
  position: absolute;
  left: var(--start-x);
  bottom: 18%;
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 247, 219, 0.95), rgba(255, 136, 46, 0.9) 45%, rgba(255, 52, 0, 0.22) 100%);
  box-shadow: 0 0 10px rgba(255, 138, 59, 0.5);
  animation: spark-fly 1450ms ease-out var(--delay) forwards;
}

@keyframes spark-fly {
  0% {
    transform: translate(-50%, 0) scale(0.9);
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  100% {
    transform: translate(calc(-50% + var(--dx)), var(--dy)) scale(0.25);
    opacity: 0;
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    var(--bg-1);
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.45);
}

.ai-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(251, 146, 60, 0.75);
  border-radius: 999px;
  padding: 0.68rem 0.9rem;
  color: #fff7ed;
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.35);
  font-weight: 700;
}

.ai-fab svg {
  width: 1rem;
  height: 1rem;
}

.ai-widget {
  position: fixed;
  z-index: 46;
  width: min(420px, calc(100vw - 1.5rem));
  max-height: min(78vh, 700px);
  border: 1px solid var(--line);
  border-radius: 1rem 1rem 0.7rem 1rem;
  padding: 0.9rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    var(--bg-1);
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.45);
  right: 1rem;
  bottom: 4.2rem;
}

.ai-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 0.65rem;
}

.ai-chat-log {
  min-height: 180px;
  max-height: 38vh;
  overflow: auto;
  display: grid;
  gap: 0.55rem;
  padding-right: 0.2rem;
}

.chat-bubble {
  max-width: 88%;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.chat-bubble p,
.chat-bubble ul,
.chat-bubble h1,
.chat-bubble h2,
.chat-bubble h3 {
  margin: 0.24rem 0;
}

.chat-bubble ul {
  padding-left: 1.1rem;
}

.chat-bubble code {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.35rem;
  padding: 0.08rem 0.34rem;
  background: rgba(0, 0, 0, 0.25);
  color: #fdba74;
}

.chat-bubble a {
  color: #fdba74;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.user-bubble {
  justify-self: end;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.27), rgba(249, 115, 22, 0.15));
  border-color: rgba(249, 115, 22, 0.5);
  color: #fff7ed;
}

.ai-bubble {
  justify-self: start;
  background: rgba(255, 255, 255, 0.03);
  color: #e4e4e7;
}

.ai-error-bubble {
  border-color: rgba(251, 113, 133, 0.45);
  color: #fda4af;
}

.markdown-body {
  color: #d4d4d8;
  font-size: 0.9rem;
  line-height: 1.5;
}

.markdown-body p,
.markdown-body ul,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin: 0.25rem 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: #f4f4f5;
  font-weight: 600;
}

.markdown-body ul {
  padding-left: 1.1rem;
}

.markdown-body code {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.35rem;
  padding: 0.08rem 0.34rem;
  background: rgba(0, 0, 0, 0.25);
  color: #fdba74;
}

.markdown-body a {
  color: #fdba74;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.subtasks-list {
  display: grid;
  gap: 0.45rem;
}

.subtasks-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.65rem;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.02);
}

.subtasks-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.subtask-chevron {
  display: inline-flex;
  color: #a1a1aa;
  font-size: 0.75rem;
  transition: transform 0.16s ease;
}

.subtask-chevron.is-open {
  transform: rotate(180deg);
}

.subtasks-body {
  margin-top: 0.45rem;
}

.roadmap-timeline {
  display: grid;
  gap: 0.9rem;
}

.roadmap-node {
  position: relative;
  padding-left: 1.15rem;
}

.roadmap-node::before {
  content: "";
  position: absolute;
  left: 0.33rem;
  top: 0.7rem;
  bottom: -1.15rem;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.roadmap-node.is-last::before {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(148, 163, 184, 0.4);
}

.timeline-dot.is-progress {
  background: rgba(249, 115, 22, 0.78);
  border-color: rgba(249, 115, 22, 0.9);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.timeline-dot.is-done {
  background: rgba(74, 222, 128, 0.8);
  border-color: rgba(74, 222, 128, 0.95);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.14);
}

.roadmap-card {
  border-left: 1px solid rgba(249, 115, 22, 0.2);
}

.roadmap-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.32rem;
}

.roadmap-progress-track {
  height: 0.46rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.roadmap-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.9), rgba(251, 146, 60, 0.95));
}

.milestone-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.65rem;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.02);
}

.milestones-body {
  margin-top: 0.45rem;
}

.milestones-list {
  display: grid;
  gap: 0.45rem;
}

.milestone-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.65rem;
  padding: 0.35rem 0.45rem;
  background: rgba(255, 255, 255, 0.02);
}

.milestone-item.is-done .subtask-text {
  text-decoration: line-through;
  color: #71717a;
}

.milestone-text-wrap {
  min-width: 0;
}

.milestone-date {
  color: #a1a1aa;
  font-size: 0.74rem;
  margin-top: 0.1rem;
}

.milestone-form {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.45rem;
}

.subtask-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.65rem;
  padding: 0.35rem 0.45rem;
  background: rgba(255, 255, 255, 0.02);
}

.subtask-item.is-done .subtask-text {
  text-decoration: line-through;
  color: #71717a;
}

.subtask-toggle {
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  min-width: 1.8rem;
  height: 1.8rem;
  background: rgba(0, 0, 0, 0.25);
  color: #fdba74;
  font-weight: 700;
}

.subtask-text {
  font-size: 0.85rem;
  color: #e4e4e7;
}

.subtask-remove {
  border: 0;
  background: transparent;
  color: #a1a1aa;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.subtask-remove:hover {
  color: #fdba74;
}

.subtask-remove .icon {
  width: 0.86rem;
  height: 0.86rem;
}

.subtask-empty {
  font-size: 0.84rem;
}

.subtask-form {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
}
