html { scroll-behavior: smooth; }

[hidden] { display: none !important; }

.field-input {
  width: 100%;
  border-radius: 1.15rem;
  border: 1px solid rgb(203 213 225);
  background: #fff;
  padding: 0.85rem 1rem;
  color: rgb(15 23 42);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field-input:focus {
  border-color: rgb(113 136 121);
  box-shadow: 0 0 0 4px rgb(231 239 236);
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  padding: 0.78rem 1.05rem;
  font-size: 0.9rem;
  font-weight: 750;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, color .14s ease;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover { transform: translateY(-1px); }

.btn-primary {
  background: rgb(94 112 100);
  color: #fff;
}

.btn-primary:hover { background: rgb(75 89 81); }

.btn-secondary {
  border: 1px solid rgb(207 223 216);
  background: rgb(244 247 246);
  color: rgb(75 89 81);
}

.btn-secondary:hover { background: rgb(231 239 236); }

.btn-ghost {
  border: 1px solid rgb(203 213 225);
  background: #fff;
  color: rgb(51 65 85);
}

.btn-ghost:hover { background: rgb(248 250 252); }

.btn-small { padding: 0.62rem 0.9rem; border-radius: 0.85rem; }

.mode-tab {
  text-align: left;
  border-radius: 1.45rem;
  padding: 1rem 1.1rem;
  border: 1px solid transparent;
  background: transparent;
  color: rgb(51 65 85);
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.mode-tab:hover { background: rgb(248 250 252); }
.mode-tab.is-active {
  background: rgb(244 247 246);
  border-color: rgb(207 223 216);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.mode-tab-title { display: block; font-weight: 800; color: rgb(15 23 42); }
.mode-tab-subtitle { display: block; margin-top: .22rem; font-size: .82rem; line-height: 1.4; color: rgb(100 116 139); }

.topic-card,
.benefit-card {
  overflow: hidden;
  border-radius: 1.4rem;
  border: 1px solid rgb(226 232 240);
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.topic-card.is-selected,
.benefit-card.is-selected {
  border-color: rgb(113 136 121);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.topic-header {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  background: rgb(248 250 252 / .78);
}

.topic-toggle,
.benefit-toggle {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  gap: 0.85rem;
  text-align: left;
}

.topic-toggle { padding: 1rem 1.1rem; }
.benefit-toggle { padding: 1rem 1.1rem; }

.selection-indicator,
.benefit-check {
  margin-top: .12rem;
  display: inline-flex;
  height: 1.25rem;
  width: 1.25rem;
  flex: 0 0 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: .42rem;
  border: 1px solid rgb(203 213 225);
  background: #fff;
  color: #fff;
  font-size: .8rem;
  font-weight: 900;
}

.topic-card.is-selected .selection-indicator,
.benefit-card.is-selected .benefit-check {
  border-color: rgb(113 136 121);
  background: rgb(113 136 121);
  box-shadow: inset 0 0 0 3px #fff;
}

.topic-icon {
  margin-left: auto;
  color: rgb(100 116 139);
  font-size: 1.4rem;
  line-height: 1;
}

.topic-remove {
  align-self: center;
  margin: .75rem .8rem .75rem 0;
  border-radius: 999px;
  border: 1px solid rgb(203 213 225);
  background: #fff;
  padding: .42rem .68rem;
  font-size: .75rem;
  font-weight: 800;
  color: rgb(71 85 105);
}

.topic-remove:hover { background: rgb(248 250 252); }
.topic-content { border-top: 1px solid rgb(226 232 240); padding: 1rem; background: #fff; }

.todo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .9rem;
  border-radius: 1.1rem;
  border: 1px solid rgb(226 232 240);
  background: #fff;
  padding: 1rem;
}

@media (min-width: 780px) {
  .todo-row { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
}

.todo-row.is-done { border-color: rgb(187 247 208); background: rgb(240 253 244 / .45); }
.todo-row.is-muted { opacity: .58; background: rgb(248 250 252); }

.status-group { display: flex; flex-wrap: wrap; gap: .45rem; }

.status-button {
  border-radius: 999px;
  border: 1px solid rgb(203 213 225);
  background: #fff;
  padding: .45rem .68rem;
  font-size: .75rem;
  font-weight: 800;
  color: rgb(71 85 105);
}

.status-button:hover { background: rgb(248 250 252); }
.status-button.is-active[data-status="open"] { border-color: rgb(113 136 121); background: rgb(244 247 246); color: rgb(75 89 81); }
.status-button.is-active[data-status="done"] { border-color: rgb(34 197 94); background: rgb(240 253 244); color: rgb(22 101 52); }
.status-button.is-active[data-status="irrelevant"] { border-color: rgb(203 213 225); background: rgb(241 245 249); color: rgb(100 116 139); }

.way-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgb(244 247 246);
  color: rgb(75 89 81);
  padding: .28rem .58rem;
  font-size: .72rem;
  font-weight: 800;
}

.preview-content p + p { margin-top: .75rem; }
.preview-paragraph { color: rgb(71 85 105); }

.preview-topic { margin-top: 1.35rem; }
.preview-topic h3 {
  color: rgb(75 89 81);
  font-size: .86rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.preview-item {
  display: flex;
  gap: .8rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 1.1rem;
  padding: 1rem;
  background: #fff;
}

.preview-item.is-done { background: rgb(248 250 252); }

.preview-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 1.55rem;
  border-radius: 999px;
  background: rgb(244 247 246);
  color: rgb(94 112 100);
  font-size: .85rem;
  font-weight: 900;
  margin-top: .1rem;
}

.preview-item.is-done .preview-check { background: rgb(240 253 244); color: rgb(22 101 52); }

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.status-pill-open { background: rgb(244 247 246); color: rgb(75 89 81); }
.status-pill-done { background: rgb(240 253 244); color: rgb(22 101 52); }

.context-box,
.note-box,
.empty-box,
.closing-box,
.benefit-preview-item {
  border-radius: 1.1rem;
  border: 1px solid rgb(226 232 240);
  padding: 1rem;
}

.context-box { margin: 1rem 0; background: rgb(248 250 252); color: rgb(71 85 105); }
.note-box { margin-top: .75rem; background: rgb(248 250 252); color: rgb(71 85 105); }
.empty-box { background: rgb(248 250 252); border-style: dashed; color: rgb(100 116 139); }
.closing-box { margin-top: 1.8rem; padding-top: 1.3rem; border-width: 1px 0 0; border-radius: 0; color: rgb(71 85 105); }

.benefit-preview-item { background: #fff; }
.benefit-preview-item h3 { margin: 0 0 .45rem; color: rgb(15 23 42); font-weight: 850; }
.benefit-preview-item p { color: rgb(71 85 105); }
.benefit-preview-item p + p { margin-top: .55rem; }

.print-section {
  background: #eef2f1;
  border-top: 1px solid rgb(226 232 240);
  padding: 1rem;
}
.print-section[hidden] { display: none !important; }
.print-controls {
  width: min(900px, 100%);
  margin: 0 auto 1rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 1.5rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.print-paper { width: min(900px, 100%); margin: 0 auto 2rem; }
.print-page {
  background: #fff;
  color: rgb(30 41 59);
  padding: 42px;
  border: 1px solid rgb(226 232 240);
  border-radius: 24px;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.12);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.print-header { border-bottom: 1px solid rgb(226 232 240); padding-bottom: 20px; margin-bottom: 24px; }
.print-kicker { margin: 0 0 8px; color: rgb(113 136 121); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 850; }
.print-page h1 { font-size: 27px; line-height: 1.15; margin: 0; color: rgb(15 23 42); }
.print-content .preview-item,
.print-content .benefit-preview-item,
.print-content .context-box,
.print-content .note-box,
.print-content .empty-box { break-inside: avoid; }

button:focus-visible,
.field-input:focus-visible {
  outline: 3px solid rgb(207 223 216);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .print-page { padding: 24px; border-radius: 20px; }
  .print-controls { flex-direction: column; }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; color: #0f172a !important; }
  .app-shell,
  .no-print { display: none !important; }
  #printSection { display: block !important; padding: 0 !important; background: #fff !important; border: 0 !important; }
  #printPaper,
  .print-paper { width: auto !important; margin: 0 !important; }
  .print-page { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; }
}

.benefit-running-text {
  margin-top: 1.25rem;
  display: grid;
  gap: 1rem;
}

.benefit-running-paragraph {
  border-left: 4px solid rgb(207 223 216);
  border-radius: 1.1rem;
  background: rgb(248 250 252);
  padding: 1rem 1.1rem;
  line-height: 1.75;
  color: rgb(51 65 85);
}

.benefit-running-paragraph strong {
  color: rgb(15 23 42);
}

.topic-quickbar {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: rgb(248 250 252);
  border: 1px solid rgb(226 232 240);
  padding: .85rem;
}

@media (min-width: 760px) {
  .topic-quickbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.quick-action {
  border-radius: 999px;
  border: 1px solid rgb(203 213 225);
  background: #fff;
  padding: .42rem .65rem;
  font-size: .73rem;
  font-weight: 800;
  color: rgb(71 85 105);
}

.quick-action:hover {
  background: rgb(244 247 246);
  border-color: rgb(207 223 216);
  color: rgb(75 89 81);
}
