:root {
  --orange: #ed6508;
  --orange-dark: #bd4700;
  --orange-soft: #fff0e4;
  --ink: #1c2422;
  --ink-2: #303936;
  --muted: #6c7471;
  --line: #dedfd9;
  --line-dark: #c7cac2;
  --page: #f5f4f0;
  --surface: #fff;
  --green: #178554;
  --green-dark: #0e673f;
  --green-soft: #e7f5ed;
  --red: #b63b2e;
  --red-soft: #fff0ed;
  --amber: #b97616;
  --amber-soft: #fff6df;
  --shadow: 0 20px 60px rgba(28, 36, 34, .09);
  --shadow-soft: 0 8px 28px rgba(28, 36, 34, .07);
  --radius: 18px;
  --max: 1360px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(28, 36, 34, .027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 36, 34, .027) 1px, transparent 1px),
    var(--page);
  background-size: 40px 40px;
}

body.dialog-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 10px;
  transform: translateY(-140%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(222, 223, 217, .85);
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(var(--max), calc(100% - 40px));
  min-height: 78px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 2px solid var(--orange);
  border-radius: 14px;
  object-fit: cover;
}

.brand strong, .brand small { display: block; }

.brand strong {
  font-size: .98rem;
  line-height: 1.05;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-link {
  min-height: 42px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 850;
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}

.top-link:hover {
  color: var(--orange-dark);
  border-color: #f0b58d;
  transform: translateY(-1px);
}

.top-link-whatsapp {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.top-link-whatsapp:hover {
  color: #fff;
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--ink);
  border-bottom: 6px solid var(--orange);
}

.hero::before {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  right: -130px;
  bottom: -290px;
  border: 80px solid rgba(237, 101, 8, .12);
  border-radius: 50%;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .45;
  background:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, #000, transparent 84%);
}

.hero-inner {
  position: relative;
  width: min(var(--max), calc(100% - 40px));
  min-height: 410px;
  margin: auto;
  padding: 66px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
  align-items: center;
  gap: 72px;
}

.eyebrow {
  margin: 0 0 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffb783;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 32px;
  height: 3px;
  display: inline-block;
  background: var(--orange);
}
.eyebrow.dark { color: var(--orange-dark); }

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.4rem, 7.2vw, 6.7rem);
  line-height: .82;
  letter-spacing: -.065em;
  text-transform: uppercase;
}

.hero h1 em { color: var(--orange); font-style: normal; }

.hero-copy > p:last-child {
  max-width: 680px;
  margin: 26px 0 0;
  color: #cdd3d1;
  font-size: 1rem;
  line-height: 1.65;
}

.hero-plan {
  position: relative;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .22);
  backdrop-filter: blur(9px);
}

.hero-plan::after {
  content: "";
  position: absolute;
  top: -1px;
  right: 34px;
  width: 74px;
  height: 5px;
  background: var(--orange);
}

.plan-label {
  color: #aeb7b4;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .18em;
}

.plan-track {
  margin: 30px 0 26px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
}

.plan-node {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.plan-node b {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  border: 1px solid #59615e;
  border-radius: 14px;
  color: #aab2af;
  background: #27302d;
  font-size: .82rem;
}

.plan-node.active b {
  color: #fff;
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: 0 0 0 7px rgba(237, 101, 8, .13);
}

.plan-node.done b {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.plan-node span {
  color: #c4cbc8;
  font-size: .72rem;
  font-weight: 800;
}

.plan-line {
  height: 1px;
  margin: 0 10px 27px;
  background: repeating-linear-gradient(90deg, #56605c 0 8px, transparent 8px 14px);
}

.hero-plan > p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #aeb7b4;
  font-size: .72rem;
  font-weight: 700;
}

.live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #38c981;
  box-shadow: 0 0 0 5px rgba(56, 201, 129, .12);
}

.live-dot.saving {
  background: #f2aa3d;
  box-shadow: 0 0 0 5px rgba(242, 170, 61, .12);
}

.live-dot.offline {
  background: #9ca4a1;
  box-shadow: 0 0 0 5px rgba(156, 164, 161, .12);
}

.workspace {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 92px;
}

.stats {
  margin-top: -74px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat {
  min-height: 164px;
  padding: 25px 26px;
  position: relative;
  display: grid;
  align-content: space-between;
  border-right: 1px solid var(--line);
}

.stat:last-child { border-right: 0; }

.stat::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: #98a09d;
  transform: scaleX(.26);
  transform-origin: left;
  transition: transform .45s ease;
}

.stat:hover::after { transform: scaleX(1); }
.stat-orange::after { background: var(--orange); }
.stat-green::after { background: var(--green); }
.stat-dark::after { background: var(--ink); }

.stat-label {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.stat strong {
  margin-top: 8px;
  font-size: 3.1rem;
  line-height: 1;
  letter-spacing: -.07em;
}

.stat small {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 650;
}

.toolbar {
  position: sticky;
  top: 92px;
  z-index: 20;
  margin: 32px 0 24px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(222, 223, 217, .9);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.filters {
  min-width: 0;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter {
  min-height: 45px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--muted);
  border: 0;
  border-radius: 11px;
  background: transparent;
  font-size: .78rem;
  font-weight: 850;
  transition: color .2s ease, background .2s ease;
}

.filter span {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: #777e7b;
  background: #eceee9;
  font-size: .66rem;
}

.filter:hover { color: var(--ink); background: #f2f2ee; }
.filter.active { color: #fff; background: var(--ink); }
.filter.active span { color: #fff; background: rgba(255, 255, 255, .16); }

.add-button {
  min-height: 46px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 0 0 auto;
  border: 1px solid var(--orange);
  border-radius: 11px;
  color: #fff;
  background: var(--orange);
  font-size: .78rem;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(237, 101, 8, .21);
  transition: transform .2s ease, background .2s ease;
}

.add-button:hover { background: var(--orange-dark); transform: translateY(-1px); }
.add-button > span { font-size: 1.1rem; line-height: 1; }
.roadmap-sections { display: grid; gap: 20px; }

.roadmap-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.roadmap-section.drag-over {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(237, 101, 8, .1), var(--shadow-soft);
}

.section-head {
  min-height: 83px;
  padding: 19px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: #fafaf7;
}

.section-title-wrap { display: flex; align-items: center; gap: 14px; }

.section-symbol {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: #fff;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .05em;
}

.roadmap-section[data-status="in_progress"] .section-symbol {
  color: var(--orange-dark);
  border-color: #ffc89f;
  background: var(--orange-soft);
}

.roadmap-section[data-status="completed"] .section-symbol {
  color: var(--green-dark);
  border-color: #acd9c1;
  background: var(--green-soft);
}

.section-head h2 { margin: 0; font-size: 1.05rem; line-height: 1.2; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: .72rem; }

.section-count {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: #fff;
  font-size: .68rem;
  font-weight: 850;
  white-space: nowrap;
}

.task-list { min-height: 90px; padding: 8px 22px 20px; }

.task-card {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background .2s ease, opacity .2s ease;
}

.task-card:last-child { border-bottom: 0; }
.task-card:hover { background: #fff; }
.task-card.dragging { opacity: .42; }

.task-rail {
  padding: 22px 10px 22px 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}

.drag-handle {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: #9ba19e;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  line-height: 1;
  letter-spacing: -3px;
  cursor: grab;
}

.drag-handle:hover { color: var(--ink); border-color: var(--line); background: #fff; }
.drag-handle:active { cursor: grabbing; }

.task-complete-control {
  position: relative;
  width: 31px;
  height: 31px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  cursor: pointer;
}

.task-complete {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.task-complete-box {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 2px solid #b9c0bc;
  border-radius: 6px;
  background: #fff;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.task-complete-box::after {
  content: "";
  width: 8px;
  height: 13px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  opacity: 0;
  transform: translateY(-1px) rotate(45deg) scale(.7);
  transition: opacity .18s ease, transform .18s ease;
}

.task-complete-control:hover .task-complete-box {
  border-color: var(--green-dark);
  transform: translateY(-1px);
}

.task-complete:focus-visible + .task-complete-box {
  outline: 3px solid rgba(31, 139, 91, .22);
  outline-offset: 2px;
}

.task-complete:checked + .task-complete-box {
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.task-complete:checked + .task-complete-box::after {
  opacity: 1;
  transform: translateY(-1px) rotate(45deg) scale(1);
}

.task-index { color: #a0a6a3; font-size: .62rem; font-weight: 850; }
.task-content { min-width: 0; padding: 23px 0 20px; }

.task-topline {
  min-height: 27px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.task-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.badge {
  min-height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #f7f7f4;
  font-size: .6rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.badge-high { color: var(--red); border-color: #f1c4bd; background: var(--red-soft); }
.badge-medium { color: var(--amber); border-color: #ead5a3; background: var(--amber-soft); }
.badge-low { color: var(--green-dark); border-color: #bcdcc9; background: var(--green-soft); }

.task-title {
  margin: 11px 0 7px;
  font-size: 1.13rem;
  line-height: 1.28;
  letter-spacing: -.015em;
}

.task-card.is-completed .task-title {
  color: #747d79;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.task-description {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.6;
}
.task-description:empty { display: none; }

.task-description.collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.description-toggle {
  margin: 6px 0 0;
  padding: 0;
  color: var(--orange-dark);
  border: 0;
  background: transparent;
  font-size: .68rem;
  font-weight: 850;
}

.task-attachments {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}

.task-attachments:empty { display: none; }

.task-attachment {
  min-width: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eceee9;
}

.task-attachment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.task-attachment:hover img { transform: scale(1.04); }

.task-attachment span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #fff;
  background: rgba(28, 36, 34, .74);
  font-size: .55rem;
  font-weight: 850;
}

.task-tags { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.task-tags:empty { display: none; }

.tag {
  padding: 5px 8px;
  border-radius: 7px;
  color: #606966;
  background: #eceee9;
  font-size: .62rem;
  font-weight: 800;
}

.task-meta {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #737b78;
  font-size: .67rem;
  font-weight: 750;
}

.meta-item { display: inline-flex; align-items: center; gap: 6px; }

.meta-mark {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: .56rem;
  font-weight: 950;
}

.task-actions {
  margin-top: 17px;
  padding-top: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-top: 1px dashed #d9dbd5;
}

.reorder-actions { margin-right: auto; display: flex; gap: 4px; }

.mini-button, .text-button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: .68rem;
  font-weight: 800;
}

.mini-button { width: 34px; padding: 0; }
.text-button { padding: 0 9px; }

.mini-button:hover, .text-button:hover {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}

.mini-button:disabled { opacity: .32; cursor: not-allowed; }

.text-button.danger:hover {
  color: var(--red);
  border-color: #efc8c2;
  background: var(--red-soft);
}

.comment-count {
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: var(--ink);
  background: #e9ebe6;
  font-size: .58rem;
}

.comments-panel {
  margin-top: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8f8f5;
}

.comments-list { display: grid; gap: 9px; }
.comments-list:empty { display: none; }

.comment {
  padding: 11px 12px;
  border: 1px solid #e4e5e0;
  border-radius: 10px;
  background: #fff;
}

.comment-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comment-head strong { font-size: .7rem; }
.comment-head time { color: #929895; font-size: .6rem; }
.comment p { margin: 6px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }

.comment-form {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 8px;
}

.comment-form input, .comment-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  outline: none;
  font-size: .72rem;
}

.comment-form textarea { min-height: 42px; resize: vertical; }

.comment-form input:focus, .comment-form textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(237, 101, 8, .1);
}

.comment-form button {
  min-height: 42px;
  padding: 0 13px;
  align-self: start;
  border: 1px solid var(--ink);
  border-radius: 9px;
  color: #fff;
  background: var(--ink);
  font-size: .68rem;
  font-weight: 850;
}

.empty-state { min-height: 145px; display: grid; place-items: center; text-align: center; }
.empty-state div { max-width: 330px; }
.empty-state strong { display: block; font-size: .9rem; }
.empty-state p { margin: 6px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }

.idea-callout {
  margin-top: 28px;
  padding: 42px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border: 1px solid #f0b181;
  border-radius: var(--radius);
  background: var(--orange-soft);
}

.idea-callout::after {
  content: "+";
  position: absolute;
  right: 16%;
  bottom: -80px;
  color: rgba(237, 101, 8, .08);
  font-size: 15rem;
  font-weight: 200;
  line-height: 1;
  transform: rotate(12deg);
}

.idea-callout > div, .idea-callout > button { position: relative; z-index: 2; }

.idea-callout h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -.045em;
}

.idea-callout > div > p:last-child {
  max-width: 650px;
  margin: 10px 0 0;
  color: #73533d;
  font-size: .86rem;
  line-height: 1.55;
}

.outline-button {
  min-height: 50px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex: 0 0 auto;
  border: 1px solid var(--ink);
  border-radius: 11px;
  color: #fff;
  background: var(--ink);
  font-size: .76rem;
  font-weight: 900;
  transition: transform .2s ease, background .2s ease;
}

.outline-button:hover { background: var(--ink-2); transform: translateY(-2px); }

.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 46px;
  display: flex;
  justify-content: space-between;
  gap: 38px;
  border-top: 1px solid var(--line-dark);
}

.footer-brand {
  font-size: .84rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-footer p { margin: 8px 0 0; color: var(--muted); font-size: .72rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; }
.footer-links a { color: var(--muted); font-size: .72rem; font-weight: 750; text-decoration: none; }
.footer-links a:hover { color: var(--orange-dark); }

dialog { color: var(--ink); }

dialog::backdrop {
  background: rgba(17, 22, 20, .72);
  backdrop-filter: blur(8px);
}

.task-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .34);
}

.task-dialog form { padding: 30px; }

.dialog-head {
  margin-bottom: 24px;
  padding-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-kicker {
  margin: 0 0 5px;
  color: var(--orange-dark);
  font-size: .66rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dialog-head h2, .confirm-dialog h2 { margin: 0; font-size: 1.55rem; letter-spacing: -.035em; }

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: #fff;
  font-size: 1.35rem;
}
.icon-button:hover { color: var(--ink); background: #f3f4ef; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.field { min-width: 0; display: grid; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field > span { font-size: .7rem; font-weight: 850; }
.field > span b { color: var(--orange); }
.field > span small { margin-left: 5px; color: var(--muted); font-weight: 600; }

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 47px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fafaf7;
  outline: none;
  font-size: .8rem;
}

.field textarea { min-height: 112px; resize: vertical; }

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(237, 101, 8, .1);
}

.upload-area {
  min-height: 128px;
  padding: 22px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1.5px dashed #c4c7c0;
  border-radius: 13px;
  color: var(--muted);
  background: #fafaf7;
  text-align: center;
  transition: border-color .2s ease, background .2s ease;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.upload-area input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-area strong {
  color: var(--ink);
  font-size: .78rem;
}

.upload-area small {
  font-size: .68rem;
}

.upload-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 3px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--orange);
  font-size: 1.25rem;
}

.attachment-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 9px;
}

.attachment-preview:empty { display: none; }

.attachment-preview-item {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f0f1ed;
}

.attachment-preview-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.attachment-preview-item button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 8px;
  color: #fff;
  background: rgba(28, 36, 34, .84);
  font-size: 1rem;
  line-height: 1;
}

.attachment-preview-item p {
  margin: 0;
  padding: 7px 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: .6rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-actions { margin-top: 26px; display: flex; justify-content: flex-end; gap: 9px; }

.cancel-button, .save-button, .delete-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: .76rem;
  font-weight: 900;
}

.cancel-button { color: var(--muted); border: 1px solid var(--line); background: #fff; }
.save-button { color: #fff; border: 1px solid var(--orange); background: var(--orange); }
.save-button:hover { background: var(--orange-dark); }
.delete-button { color: #fff; border: 1px solid var(--red); background: var(--red); }

.confirm-dialog {
  width: min(430px, calc(100% - 28px));
  padding: 30px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .34);
  text-align: center;
}

.confirm-mark {
  width: 50px;
  height: 50px;
  margin: 0 auto 17px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 1.4rem;
  font-weight: 950;
}

.confirm-dialog > p {
  margin: 10px auto 0;
  max-width: 320px;
  color: var(--muted);
  font-size: .79rem;
  line-height: 1.5;
}

.confirm-dialog .dialog-actions { justify-content: center; }

.image-dialog {
  width: min(980px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 12px;
  overflow: visible;
  border: 0;
  border-radius: 18px;
  background: #111614;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .45);
}

.image-dialog img {
  width: 100%;
  max-height: calc(100dvh - 100px);
  object-fit: contain;
  border-radius: 11px;
}

.image-dialog p {
  margin: 10px 4px 2px;
  overflow: hidden;
  color: #d9dfdc;
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-dialog-close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-size: 1.35rem;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  max-width: min(360px, calc(100% - 36px));
  padding: 13px 16px;
  color: #fff;
  border-left: 4px solid var(--orange);
  border-radius: 10px;
  background: var(--ink);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .22);
  font-size: .76rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity .22s ease, transform .22s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }
:focus-visible { outline: 3px solid rgba(237, 101, 8, .35); outline-offset: 3px; }

@media (max-width: 1050px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(350px, .72fr);
    gap: 42px;
  }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .comment-form { grid-template-columns: 130px minmax(0, 1fr); }
  .comment-form button { grid-column: 2; justify-self: end; }
}

@media (max-width: 820px) {
  .hero-inner { padding: 53px 0 115px; grid-template-columns: 1fr; }
  .hero-plan { max-width: 570px; }
  .stats { margin-top: -70px; }
  .toolbar { top: 84px; align-items: stretch; flex-direction: column; gap: 7px; }
  .add-button { width: 100%; }
  .idea-callout { padding: 32px; align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .topbar-inner, .hero-inner, .workspace, .site-footer { width: calc(100% - 22px); }
  .topbar-inner { min-height: 68px; }
  .brand { gap: 8px; overflow: hidden; }
  .brand img { width: 44px; height: 44px; flex-basis: 44px; border-radius: 11px; }
  .brand span { min-width: 0; }
  .brand strong {
    max-width: 130px;
    overflow: hidden;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .brand small { display: none; }
  .top-link { min-height: 38px; padding: 0 10px; font-size: .68rem; }
  .top-link:first-child { display: none; }
  .hero-inner { min-height: 0; padding: 44px 0 106px; gap: 35px; }
  .hero h1 { font-size: clamp(3rem, 17vw, 4.8rem); }
  .hero-copy > p:last-child { margin-top: 20px; font-size: .86rem; }
  .hero-plan { padding: 23px 18px; }
  .plan-node b { width: 47px; height: 47px; }
  .plan-node span { font-size: .63rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 15px; }
  .stat { min-height: 134px; padding: 18px; }
  .stat strong { font-size: 2.35rem; }
  .stat small { font-size: .64rem; }
  .toolbar { top: 76px; margin: 22px 0 16px; padding: 8px; }
  .filter { min-height: 41px; padding: 0 11px; font-size: .7rem; }
  .section-head { min-height: 74px; padding: 15px; }
  .section-symbol { width: 38px; height: 38px; }
  .section-head h2 { font-size: .93rem; }
  .section-count { padding: 7px 8px; font-size: .61rem; }
  .task-list { padding: 3px 14px 13px; }
  .task-card { grid-template-columns: 38px minmax(0, 1fr); }
  .task-rail { padding-right: 5px; }
  .drag-handle { width: 29px; height: 29px; }
  .task-complete-control { width: 29px; height: 29px; }
  .task-complete-box { width: 23px; height: 23px; }
  .task-content { padding: 20px 0 17px; }
  .task-topline { align-items: flex-start; flex-direction: column; gap: 7px; }
  .task-title { margin-top: 9px; font-size: 1rem; }
  .task-description { font-size: .76rem; }
  .task-attachments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-actions { align-items: stretch; flex-wrap: wrap; }
  .reorder-actions { width: 100%; }
  .text-button { flex: 1; padding-inline: 6px; font-size: .62rem; }
  .comment-form { grid-template-columns: 1fr; }
  .comment-form button { grid-column: auto; justify-self: stretch; }
  .idea-callout { padding: 26px 22px; }
  .outline-button { width: 100%; }
  .site-footer { padding: 30px 0 36px; flex-direction: column; }
  .footer-links { justify-content: flex-start; }
  .task-dialog form { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .attachment-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions > button { width: 100%; }
  .toast { right: 11px; bottom: 11px; max-width: calc(100% - 22px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
