:root {
  --paper: #fafafa;
  --paper-strong: #ffffff;
  --sidebar: #f2f2f2;
  --sidebar-hover: #e8e8e8;
  --ink: #222222;
  --ink-soft: #666666;
  --ink-faint: #999999;
  --line: #dedede;
  --line-soft: #ececec;
  --accent: #3a3a3a;
  --accent-soft: #ececec;
  --button-background: #e5e5e5;
  --button-background-hover: #d9d9d9;
  --button-border: #d0d0d0;
  --button-text: #262626;
  --success: #595959;
  --danger: #444444;
  --shadow: 0 18px 60px rgba(34, 34, 34, 0.12);
  --sidebar-width: 280px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0%, rgba(32, 32, 32, 0.03), transparent 28rem),
    var(--paper);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[contenteditable]:focus-visible {
  outline: 3px solid rgba(32, 32, 32, 0.16);
  outline-offset: 2px;
}

svg {
  display: block;
}

.app-shell {
  min-height: 100vh;
}

.impersonation-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  display: flex;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 7px 18px;
  background: #252525;
  color: #fff;
  font-size: 13px;
}

.impersonation-banner > span {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.impersonation-banner > span > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.impersonation-banner form {
  flex: 0 0 auto;
  margin: 0;
}

.impersonation-banner .button {
  min-height: 36px;
  border-color: rgba(255, 255, 255, 0.45);
  background: #fff;
  color: #222;
}

.is-impersonating {
  padding-top: 52px;
}

.is-impersonating .app-shell,
.is-impersonating .main-area {
  min-height: calc(100vh - 52px);
}

.is-impersonating .sidebar {
  top: 52px;
}

.is-impersonating .topbar {
  top: 52px;
}

@media (max-width: 560px) {
  .impersonation-banner {
    gap: 10px;
    padding-inline: 12px;
  }

  .impersonation-banner-detail {
    display: none;
  }

  .impersonation-banner .button {
    padding-inline: 10px;
    font-size: 12px;
  }
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 16px 16px;
  border-right: 1px solid var(--line);
  background: rgba(242, 242, 242, 0.96);
  backdrop-filter: blur(18px);
}

.workspace-mark {
  display: flex;
  align-items: center;
  padding: 0 8px 27px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.workspace-name {
  margin: 0;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.25;
}

.project-switcher,
.customer-preview-switcher {
  margin: 2px 8px 14px;
}

.project-switcher label,
.customer-preview-switcher label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-switcher > div,
.customer-preview-switcher > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.project-switcher select,
.project-switcher button,
.customer-preview-switcher select,
.customer-preview-switcher button {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-strong);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.project-switcher select,
.customer-preview-switcher select {
  padding: 0 8px;
}

.project-switcher button,
.customer-preview-switcher button {
  padding: 0 10px;
  cursor: pointer;
}

.project-switcher button:hover,
.customer-preview-switcher button:hover {
  background: var(--sidebar-hover);
}

.main-nav {
  display: flex;
  min-height: 0;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 5px;
}

.nav-item,
.nav-item-row {
  min-height: 42px;
  border-radius: var(--radius-sm);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 570;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--ink);
}

.nav-item.active {
  background: var(--paper-strong);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(32, 32, 32, 0.05), 0 4px 18px rgba(32, 32, 32, 0.045);
}

.nav-item.active .nav-icon {
  color: var(--accent);
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.nav-icon svg,
.icon-button svg,
.mobile-menu-button svg,
.tree-toggle svg,
.save-state svg,
.block-icon svg,
.toolbar-button svg,
.task-grip svg,
.page-link-icon svg,
.delete-button svg,
.file-kind svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-status {
  display: grid;
  min-width: 25px;
  height: 23px;
  margin-left: auto;
  padding: 0 7px;
  place-items: center;
  border-radius: 999px;
  background: #dedede;
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.nav-status.is-empty {
  width: 23px;
  min-width: 23px;
  padding: 5px;
  background: #e5e5e5;
  color: var(--success);
}

.nav-status.is-hidden {
  display: none;
}

.nav-status svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-group {
  min-height: 0;
}

.pinned-reference-links {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pinned-reference-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item-row {
  display: flex;
  align-items: center;
}

.nav-item-main {
  min-width: 0;
  flex: 1;
}

.tree-toggle,
.icon-button,
.mobile-menu-button,
.delete-button,
.dialog-close {
  display: grid;
  border: 0;
  place-items: center;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.tree-toggle {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.tree-toggle:hover,
.icon-button:hover,
.mobile-menu-button:hover,
.delete-button:hover,
.dialog-close:hover {
  background: var(--sidebar-hover);
  color: var(--ink);
}

.tree-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.tree-toggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.page-tree {
  padding: 3px 0 2px 27px;
}

.page-tree.is-collapsed {
  display: none;
}

.tree-branch {
  margin: 1px 0;
}

.tree-link-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tree-link {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  overflow: hidden;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-link:hover,
.tree-link.active {
  background: var(--sidebar-hover);
  color: var(--ink);
}

.tree-link.active {
  font-weight: 650;
}

.tree-link::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border: 1px solid currentColor;
  border-radius: 1px;
  content: "";
  transform: rotate(45deg);
}

.tree-children {
  margin-left: 12px;
  border-left: 1px solid var(--line);
  padding-left: 4px;
}

.tree-empty {
  margin: 7px 8px;
  color: var(--ink-faint);
  font-size: 12px;
}

.sidebar-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 13px 9px 3px;
  border-top: 1px solid var(--line);
}

.sidebar-footer > div:nth-child(2) {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.sidebar-footer-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}

.logout-form {
  margin: 0;
}

.sidebar-footer strong {
  font-size: 12px;
  font-weight: 680;
}

.sidebar-footer span {
  color: var(--ink-faint);
  font-size: 11px;
}

.avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.icon-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 8px;
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.main-area {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 64px;
  align-items: center;
  gap: 14px;
  padding: 0 30px;
  border-bottom: 1px solid rgba(222, 222, 222, 0.7);
  background: rgba(250, 250, 250, 0.87);
  backdrop-filter: blur(18px);
}

.breadcrumbs {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
}

.breadcrumb-part {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-link {
  color: inherit;
  text-decoration: none;
}

.breadcrumb-link:hover {
  cursor: pointer;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 620;
}

.breadcrumb-separator {
  color: var(--ink-faint);
}

.save-state {
  position: fixed;
  bottom: 18px;
  left: calc(var(--sidebar-width) + 24px);
  z-index: 21;
  display: flex;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--paper);
  box-shadow: 0 0 0 5px var(--paper);
  color: var(--success);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(2px);
  transition: opacity 350ms ease, transform 350ms ease, visibility 0s linear 350ms;
}

.save-state.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.save-state.is-saving {
  color: var(--ink-faint);
}

.save-state.is-error {
  color: var(--danger);
}

.save-state.is-saving svg,
.save-state.is-error svg {
  display: none;
}

.save-state svg {
  width: 15px;
  height: 15px;
}

.mobile-menu-button {
  display: none;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
}

.mobile-menu-button svg {
  width: 20px;
  height: 20px;
}

.content-frame {
  width: min(100%, 940px);
  margin: 0 auto;
  padding: 72px 58px 110px;
}

.loading-message,
.load-error {
  margin: 12px 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.load-error {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-strong);
}

.load-error p {
  margin: 6px 0 0;
}

.page-heading {
  position: relative;
  margin-bottom: 43px;
  padding-left: 25px;
}

.page-heading::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 4px;
  border-radius: 4px;
  background: var(--accent);
  content: "";
}

.page-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.page-kicker::before {
  width: 18px;
  height: 1px;
  background: currentColor;
  content: "";
}

.page-heading h1 {
  max-width: 760px;
  margin: 0;
  font-family: inherit;
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.reference-page-title-input {
  display: block;
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  padding: 0 0 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}

.reference-page-title-input:hover {
  border-bottom-color: var(--line);
}

.reference-page-title-input:focus {
  border-bottom-color: var(--accent);
  outline: 0;
}

.page-heading p:last-child {
  max-width: 630px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

.heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.heading-row .page-heading {
  flex: 1;
}

.surface-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 43px;
  color: var(--ink-faint);
  font-size: 12px;
  white-space: nowrap;
}

.surface-meta strong {
  color: var(--ink-soft);
  font-size: 14px;
}

.editor-shell {
  position: relative;
}

.block-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.block-row {
  position: relative;
  display: grid;
  min-height: 48px;
  grid-template-columns: 31px minmax(0, 1fr) 34px;
  align-items: start;
  border-radius: var(--radius-sm);
  transition: background 130ms ease;
}

.block-row:hover,
.block-row:focus-within {
  background: rgba(239, 239, 239, 0.68);
}

.block-row.is-dragging {
  opacity: 0.34;
}

.block-row.drag-over {
  background: var(--accent-soft);
  box-shadow: inset 0 2px 0 var(--accent);
}

.block-icon {
  display: grid;
  width: 31px;
  height: 44px;
  place-items: center;
  color: var(--ink-faint);
}

.block-icon svg {
  width: 16px;
  height: 16px;
}

.block-drag-handle {
  border-radius: 7px;
  cursor: grab;
}

.block-drag-handle:hover {
  background: var(--sidebar-hover);
  color: var(--ink-soft);
}

.block-drag-handle:active {
  cursor: grabbing;
}

.text-block-main {
  min-width: 0;
}

.text-format-toolbar {
  display: none;
  min-height: 36px;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 0;
}

.block-row:focus-within .text-format-toolbar {
  display: flex;
}

.text-format-select {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-strong);
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
}

.text-format-select {
  min-width: 104px;
  padding: 0 25px 0 8px;
}

.text-block {
  min-height: 44px;
  padding: 10px 8px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.text-block.is-image-dragging {
  border-radius: 7px;
  background: var(--accent-soft);
}

.text-block:empty::before,
.text-block.is-empty::before {
  color: var(--ink-faint);
  content: attr(data-placeholder);
  pointer-events: none;
}

.text-block p,
.text-block h1,
.text-block h2,
.text-block h3 {
  margin: 0;
  white-space: pre-wrap;
}

.text-block p + p,
.text-block p + h1,
.text-block p + h2,
.text-block p + h3,
.text-block h1 + p,
.text-block h2 + p,
.text-block h3 + p {
  margin-top: 0.55em;
}

.text-block h1 {
  font-size: 2em;
  line-height: 1.16;
}

.text-block h2 {
  font-size: 1.55em;
  line-height: 1.22;
}

.text-block h3 {
  font-size: 1.22em;
  line-height: 1.3;
}

.rich-text-block {
  cursor: text;
  white-space: pre-wrap;
}

.shortcut-rich-text {
  position: relative;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.shortcut-rich-text p {
  margin: 0;
}

.shortcut-rich-text p + p {
  margin-top: 0.55em;
}

.shortcut-rich-text[aria-multiline="false"] {
  overflow-x: auto;
  overflow-wrap: normal;
  white-space: nowrap;
}

.shortcut-rich-text.is-empty::before {
  position: absolute;
  color: var(--ink-faint);
  content: attr(data-placeholder);
  pointer-events: none;
}

.reference-link-card {
  display: flex;
  width: min(100%, 660px);
  align-items: center;
  gap: 12px;
  margin: 13px 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-strong);
  color: var(--ink);
  text-decoration: none;
  white-space: normal;
  box-shadow: 0 3px 12px rgba(34, 34, 34, 0.035);
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.reference-link-card:hover {
  border-color: #c7c7c7;
  box-shadow: 0 6px 18px rgba(32, 32, 32, 0.07);
  transform: translateY(-1px);
}

.reference-link-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.reference-link-copy strong,
.reference-link-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-link-copy strong {
  font-size: 15px;
  font-weight: 680;
}

.reference-link-copy span {
  color: var(--ink-faint);
  font-size: 12px;
}

.reference-link-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.reference-link-arrow {
  display: inline-flex;
  width: 15px;
  height: 15px;
}

.reference-link-arrow svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.delete-button {
  width: 30px;
  height: 30px;
  margin: 7px 2px 0;
  border-radius: 7px;
  opacity: 0;
}

.block-row:hover .delete-button,
.block-row:focus-within .delete-button,
.task-card:hover .delete-button,
.task-card:focus-within .delete-button {
  opacity: 1;
}

.delete-button svg {
  width: 15px;
  height: 15px;
}

.delete-button:hover {
  background: #ededed;
  color: var(--danger);
}

.page-block-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-strong);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(34, 34, 34, 0.035);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.page-block-button:hover {
  border-color: #c7c7c7;
  box-shadow: 0 6px 18px rgba(32, 32, 32, 0.07);
  transform: translateY(-1px);
}

.page-link-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.page-link-icon svg {
  width: 17px;
  height: 17px;
}

.page-block-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.page-block-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-block-copy span {
  color: var(--ink-faint);
  font-size: 12px;
}

.page-block-arrow {
  color: var(--ink-faint);
  font-size: 20px;
}

.file-block {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 10px;
}

.file-block-main {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.file-kind {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 10px;
  background: #e8e8e8;
  color: var(--ink-soft);
}

.file-kind svg {
  width: 18px;
  height: 18px;
}

.file-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.file-copy strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 630;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-copy span {
  color: var(--ink-faint);
  font-size: 12px;
}

.file-block-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.file-rename-form {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 13px;
}

.file-rename-field {
  display: flex;
  min-width: 0;
  align-items: center;
  border: 1px solid #a8a8a8;
  border-radius: 7px;
  background: var(--paper-strong);
  box-shadow: 0 0 0 3px rgba(32, 32, 32, 0.06);
}

.file-rename-field input {
  min-width: 80px;
  flex: 1;
  padding: 7px 2px 7px 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 630;
}

.file-copy .file-rename-extension {
  flex: 0 0 auto;
  padding: 0 8px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 630;
}

.file-rename-save {
  border-color: #c1c1c1;
  background: var(--accent-soft);
  color: var(--accent);
}

.file-preview {
  max-width: 100%;
  margin: 5px 4px 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #e8e8e8;
}

.file-preview img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 470px;
  object-fit: contain;
}

.editor-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.toolbar-button,
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-strong);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.toolbar-button {
  padding: 8px 12px;
}

.toolbar-button:hover,
.button-quiet:hover {
  border-color: #c8c8c8;
  background: #f2f2f2;
  color: var(--ink);
}

.toolbar-button.is-active {
  border-color: #c1c1c1;
  background: var(--accent-soft);
  color: var(--accent);
}

.toolbar-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.toolbar-button:active,
.button:active {
  transform: translateY(1px);
}

.toolbar-button svg {
  width: 16px;
  height: 16px;
}

.drop-area {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  border: 1.5px dashed #cfcfcf;
  border-radius: var(--radius-md);
  color: var(--ink-faint);
  font-size: 13px;
  text-align: center;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.drop-area.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.drop-area button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.empty-editor-prompt {
  min-height: 68px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.55;
  cursor: text;
  transition: background 140ms ease, color 140ms ease;
}

/* Administratörens projekt- och kundhantering */
.admin-page {
  background: #f6f6f6;
}

.admin-topbar {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 250, 0.94);
}

.admin-brand {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
}

.admin-brand .eyebrow {
  margin-bottom: 2px;
}

.admin-brand strong {
  font-size: 15px;
}

.admin-account,
.admin-account form {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-account > span {
  color: var(--ink-soft);
  font-size: 14px;
}

.admin-main {
  width: min(100% - 40px, 1080px);
  margin: 0 auto;
  padding: 58px 0 100px;
}

.admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.admin-heading h1 {
  margin: 12px 0 0;
  font-size: clamp(36px, 6vw, 54px);
  letter-spacing: -0.045em;
  line-height: 1;
}

.admin-heading-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.back-link {
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-strong);
  box-shadow: 0 4px 20px rgba(30, 30, 30, 0.025);
}

.admin-create-card {
  margin-bottom: 22px;
  padding: 24px;
}

.admin-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-card-heading h2 {
  margin: 0;
  font-size: 20px;
}

.admin-card-heading p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-card {
  overflow: hidden;
}

.customer-card.is-inactive {
  background: #f9f9f9;
}

.customer-summary {
  display: grid;
  grid-template-columns: 38px minmax(180px, 1.4fr) minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}

.customer-summary .avatar {
  width: 38px;
  height: 38px;
}

.customer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.customer-actions form {
  margin: 0;
}

.customer-identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.customer-identity strong,
.customer-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-identity strong {
  font-size: 15px;
}

.customer-identity span {
  color: var(--ink-soft);
  font-size: 13px;
}

.project-pill,
.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #ededed;
  color: var(--ink-soft);
  font-size: 12px;
  padding: 5px 10px;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #aaa;
  content: "";
}

.status-pill.is-active::before {
  background: #444;
}

.customer-form,
.project-form {
  border-top: 1px solid var(--line-soft);
  padding-top: 22px;
}

.admin-create-card .customer-form {
  border-top: 0;
  padding-top: 0;
}

.customer-edit-form {
  padding: 22px 18px 18px;
  background: #fafafa;
}

.is-collapsed {
  display: none !important;
}

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

.customer-form label:not(.checkbox-label),
.project-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.customer-form input:not([type="checkbox"]),
.customer-form select,
.project-form input:not([type="hidden"]) {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
  font: inherit;
  font-size: 15px;
}

.customer-form input:focus,
.customer-form select:focus,
.project-form input:focus {
  border-color: #888;
  outline: 3px solid rgba(32, 32, 32, 0.1);
}

.customer-form small {
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 400;
}

.checkbox-label {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 14px;
}

.checkbox-label input {
  width: 17px;
  height: 17px;
  accent-color: #333;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.admin-empty {
  padding: 32px;
  color: var(--ink-soft);
  text-align: center;
}

.admin-section + .admin-section {
  margin-top: 46px;
}

.admin-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px 2px 14px;
}

.admin-section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.admin-section-heading span {
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 999px;
  background: #e7e7e7;
  color: var(--ink-soft);
  font-size: 12px;
}

.project-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 17px 18px;
}

.project-card.is-inactive {
  background: #f9f9f9;
}

.project-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 9px;
  background: #ededed;
  color: var(--ink-soft);
}

.project-mark svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.project-identity strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-identity > span {
  color: var(--ink-soft);
  font-size: 13px;
}

.project-title-link {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
}

.project-link-arrow {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 15px;
  transition: color 140ms ease, transform 140ms ease;
}

.project-title-link:hover .project-link-arrow {
  color: var(--ink);
  transform: translateX(2px);
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.project-form {
  grid-column: 1 / -1;
  margin: 2px -18px -17px;
  padding: 20px 18px 18px;
  background: #fafafa;
}

.project-delete-form p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.project-delete-form p strong {
  color: var(--ink);
}

.button-danger {
  border-color: #292929;
  background: #292929;
  color: #fff;
}

.button-danger:hover {
  border-color: #111;
  background: #111;
  color: #fff;
}

.form-message-success {
  border-color: #cfcfcf;
  background: #f0f0f0;
  color: #333;
}

.simple-message-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.simple-message-page main {
  width: min(100%, 620px);
}

.simple-message-page h1 {
  margin: 12px 0;
  font-size: clamp(30px, 6vw, 48px);
  letter-spacing: -0.04em;
}

.simple-message-page p:not(.eyebrow) {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 16px;
}

@media (max-width: 760px) {
  .admin-account > span {
    display: none;
  }

  .admin-main {
    width: min(100% - 28px, 1080px);
    padding-top: 38px;
  }

  .customer-summary {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .customer-actions {
    grid-column: 2 / -1;
  }

  .project-pill {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .status-pill {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .project-card .status-pill {
    display: none;
  }
}

@media (max-width: 480px) {
  .admin-topbar {
    flex-wrap: wrap;
  }

  .admin-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-heading-actions {
    width: auto;
    align-self: flex-end;
    flex-direction: row;
  }

  .customer-summary {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .customer-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .customer-actions form,
  .customer-actions .button {
    flex: 1;
  }

  .customer-actions form .button {
    width: 100%;
  }

  .project-pill {
    grid-column: 1 / -1;
  }

  .project-card {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .project-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

.empty-editor-prompt:empty::before {
  color: #aaaaaa;
  content: attr(data-placeholder);
  pointer-events: none;
}

.empty-editor-prompt:hover,
.empty-editor-prompt:focus {
  background: rgba(239, 239, 239, 0.5);
}

.empty-editor-prompt.is-dragging {
  background: var(--accent-soft);
  color: var(--accent);
}

.empty-editor-prompt.is-dragging::before {
  color: var(--accent);
}

.inline-image-gallery {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr));
  gap: 9px;
  margin-top: 13px;
}

.inline-image-link {
  display: grid;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  min-height: 105px;
  max-height: 260px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.inline-image-link:hover {
  border-color: #aaa;
}

.inline-image-link img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 105px;
  object-fit: contain;
}

.message-comment .inline-image-gallery {
  grid-template-columns: repeat(auto-fit, minmax(min(115px, 100%), 180px));
}

.inline-image-picker {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin-top: 8px;
}

.inline-image-picker .inline-image-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding: 6px 9px;
}

.inline-image-add svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.inline-image-hint {
  color: var(--ink-faint);
  font-size: 11px;
}

.message-attachment-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.message-attachment-draft {
  display: grid;
  overflow: hidden;
  width: min(100%, 320px);
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  padding: 5px 6px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.message-attachment-draft img {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 5px;
  object-fit: cover;
}

.message-attachment-draft span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-attachment-remove {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.message-attachment-remove:hover {
  background: #f0f0f0;
  color: var(--ink);
}

.message-image-picker.is-image-dragging,
.shortcut-rich-text.is-image-dragging {
  border-color: var(--accent) !important;
  background: var(--accent-soft);
}

.inline-rich-image {
  position: relative;
  display: inline-flex;
  width: fit-content;
  min-width: 0;
  max-width: calc(100% - 4px);
  max-height: 40vh;
  margin: 8px 2px;
  vertical-align: middle;
}

.inline-rich-image-link {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  max-height: 40vh;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: zoom-in;
}

.inline-rich-image-link:hover {
  border-color: #aaa;
}

.inline-rich-image-link img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 40vh;
  border-radius: 6px;
  object-fit: contain;
}

.inline-rich-image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.14);
}

.inline-rich-image-remove::before {
  content: "×";
  font-size: 19px;
  line-height: 1;
}

.inline-rich-image-remove:hover {
  background: #fff;
  transform: scale(1.04);
}

.message-composer {
  display: grid;
  gap: 18px;
  margin-bottom: 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-strong);
  box-shadow: 0 10px 30px rgba(34, 34, 34, 0.045);
}

.message-composer.is-editing {
  margin: 0;
  border-color: #bdbdbd;
  box-shadow: none;
}

.message-composer-heading h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.message-composer-heading p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.message-field {
  display: grid;
  gap: 7px;
}

.message-field > span,
.message-recipient-picker legend {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.message-field .message-title-rich-text,
.message-field .message-rich-text {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}

.message-field .message-title-rich-text {
  min-height: 44px;
  padding: 9px 12px;
}

.message-field .message-rich-text {
  min-height: 126px;
  padding: 11px 12px;
  line-height: 1.55;
}

.message-field .message-title-rich-text:focus,
.message-field .message-rich-text:focus {
  border-color: #a8a8a8;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(32, 32, 32, 0.06);
}

.message-recipient-picker {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.message-recipient-picker legend {
  margin-bottom: 8px;
}

.message-recipient-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.message-recipient-option {
  display: flex;
  min-width: 0;
  min-height: 49px;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fafafa;
  cursor: pointer;
}

.message-recipient-option:hover {
  border-color: var(--line);
  background: #f5f5f5;
}

.message-recipient-option input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  accent-color: var(--accent);
}

.message-recipient-option > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.message-recipient-option strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-recipient-option small,
.message-recipient-empty {
  color: var(--ink-faint);
  font-size: 12px;
}

.message-recipient-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.message-composer-actions,
.message-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.message-composer-actions {
  padding-top: 2px;
}

.message-list-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 31px 2px 11px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 730;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-list-heading span {
  display: grid;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  background: #e8e8e8;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0;
}

.message-list-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 7px;
  background: linear-gradient(to right, var(--line), transparent);
}

.message-list-separator > strong {
  flex-shrink: 0;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-strong);
  box-shadow: 0 5px 20px rgba(34, 34, 34, 0.025);
}

.message-card.is-read {
  background: #fff;
}

.message-card-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  padding: 17px 19px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.message-card-toggle:hover {
  background: rgba(34, 34, 34, 0.025);
}

.message-card-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.message-card-toggle-title {
  min-width: 0;
  font-size: 17px;
  font-weight: 710;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.message-card-toggle-icon {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--ink-soft);
  transform: rotate(45deg) translate(-2px, 2px);
  transition: transform 160ms ease;
}

.message-card.is-expanded .message-card-toggle-icon {
  transform: rotate(225deg) translate(-2px, 2px);
}

.message-card.is-collapsible:not(.is-expanded) > :not(.message-card-toggle) {
  display: none;
}

.message-card.is-collapsible.is-expanded .message-card-toggle {
  border-bottom: 1px solid var(--line-soft);
}

.message-card > header {
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 17px;
  border-bottom: 1px solid var(--line-soft);
}

.message-meta {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 9px;
}

.message-meta strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 690;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-meta time,
.message-read-time {
  color: var(--ink-faint);
  font-size: 12px;
}

.message-status-pill {
  flex: 0 0 auto;
  border: 1px solid #bdbdbd;
  border-radius: 999px;
  padding: 5px 9px;
  background: #ededed;
  color: var(--ink);
  font-size: 12px;
}

.message-status-pill.is-read,
.message-card.is-sent .message-status-pill {
  border-color: var(--line);
  color: var(--ink-soft);
}

.message-card-body {
  padding: 21px 22px 23px;
}

.message-card-body h3 {
  margin: 0 0 9px;
  font-size: 20px;
  line-height: 1.3;
}

.message-card-body h3:last-child {
  margin-bottom: 0;
}

.message-card-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-receipts {
  margin: 0 18px 18px;
  padding: 15px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fafafa;
}

.message-receipts > strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.message-receipts ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.message-receipts li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  font-size: 14px;
}

.message-receipt-status {
  color: var(--ink-faint);
  font-size: 12px;
  text-align: right;
}

.message-receipt-status.is-read {
  color: var(--ink-soft);
}

.message-edit-conflict-draft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 18px 18px;
  padding: 14px 15px;
  border: 1px solid #d8cda8;
  border-radius: 8px;
  background: #fffdf5;
}

.message-edit-conflict-draft strong {
  font-size: 13px;
}

.message-edit-conflict-draft p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.message-edit-conflict-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.message-conversation {
  margin: 0 18px 18px;
  padding: 15px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.message-conversation-heading {
  display: block;
  margin-bottom: 11px;
  color: var(--ink-soft);
  font-size: 13px;
}

.message-comments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 13px;
}

.message-comment {
  padding: 11px 12px;
  border-left: 2px solid var(--line);
  background: #fafafa;
}

.message-comment.is-mine {
  margin-left: 24px;
  border-left-color: #777;
  background: #f3f3f3;
}

.message-comment-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.message-comment-meta strong {
  font-size: 13px;
}

.message-comment-meta time {
  color: var(--ink-faint);
  font-size: 12px;
}

.message-comment-text {
  margin: 5px 0 0;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.message-comment-form > .message-reply-rich-text {
  grid-column: 1 / -1;
}

.message-comment-form:first-child {
  padding-top: 0;
  border-top: 0;
}

.message-reply-rich-text {
  min-height: 82px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  font-size: 15px;
  line-height: 1.55;
}

.message-reply-rich-text:focus {
  border-color: #a8a8a8;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(32, 32, 32, 0.06);
}

.message-comment-form > .button {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  justify-self: end;
  margin-top: 8px;
}

.message-card-actions {
  min-height: 58px;
  padding: 10px 17px;
  border-top: 1px solid var(--line-soft);
}

.message-card-actions .message-read-time {
  margin-right: auto;
}

.message-card button:disabled,
.message-composer button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.message-empty {
  padding: 42px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--ink-faint);
  font-size: 14px;
  text-align: center;
}

.inbox-message-section {
  margin-bottom: 34px;
}

.inbox-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.inbox-section-heading .task-section-label {
  margin-top: 0;
}

.inbox-section-heading > a {
  color: var(--ink-soft);
  font-size: 13px;
}

.inbox-section-heading > a:hover {
  color: var(--ink);
}

.task-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) auto;
  gap: 10px;
  margin-bottom: 30px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-strong);
  box-shadow: 0 10px 30px rgba(34, 34, 34, 0.045);
}

.task-composer .task-composer-rich-text {
  min-width: 0;
  min-height: 44px;
  border: 0;
  padding: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
}

.task-settings-footer {
  position: fixed;
  bottom: 24px;
  left: calc(var(--sidebar-width) + 28px);
  z-index: 19;
  display: flex;
  justify-content: flex-start;
  margin: 0;
}

.is-task-list-view .save-state {
  left: calc(var(--sidebar-width) + 86px);
}

.task-settings-button {
  display: grid;
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  place-items: center;
  background: transparent;
  color: #333333;
  opacity: 0.42;
  cursor: pointer;
  transition: opacity 140ms ease;
}

.task-settings-button:hover,
.task-settings-button:focus-visible {
  opacity: 1;
}

.task-settings-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.task-composer .task-assignee-control {
  width: 100%;
  max-width: none;
  min-height: 44px;
  align-self: center;
  border-radius: 10px;
}

.task-composer .task-composer-rich-text:focus {
  outline: 0;
}

.task-filter-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin: -10px 0 24px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.task-filter-select-wrapper {
  position: relative;
  display: inline-flex;
}

.task-filter-select-wrapper::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.task-filter-select {
  min-width: 220px;
  min-height: 38px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 34px 7px 11px;
  background: var(--paper-strong);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.task-filter-select:hover {
  border-color: #c8c8c8;
}

.task-filter-select:focus-visible {
  border-color: #a8a8a8;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(32, 32, 32, 0.07);
}

.button {
  padding: 9px 16px;
}

.button-primary {
  border-color: var(--button-border);
  background: var(--button-background);
  color: var(--button-text);
}

.button-primary:hover {
  border-color: #c5c5c5;
  background: var(--button-background-hover);
  color: #111111;
}

.task-section-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 24px 0 10px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 730;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-section-label span {
  display: grid;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  background: #e8e8e8;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0;
}

.task-completed-section {
  margin: 0;
}

.task-section-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  margin: 24px 0 10px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 730;
  letter-spacing: 0.08em;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
}

.task-section-toggle::-webkit-details-marker {
  display: none;
}

.task-section-toggle::marker {
  content: "";
}

.task-section-toggle::after {
  content: "›";
  color: var(--ink-faint);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transition: transform 140ms ease;
}

.task-completed-section[open] > .task-section-toggle::after {
  transform: rotate(90deg);
}

.task-section-toggle:hover,
.task-section-toggle:focus-visible {
  color: var(--ink-soft);
}

.task-section-toggle:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(32, 32, 32, 0.08);
  outline-offset: 3px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-card {
  position: relative;
  display: grid;
  min-height: 56px;
  grid-template-columns: 25px 28px minmax(0, 1fr) auto 34px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: var(--paper-strong);
  transition: border-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.task-card:hover {
  border-color: var(--line);
  box-shadow: 0 7px 22px rgba(34, 34, 34, 0.045);
}

.task-subtask-marker {
  justify-self: center;
  color: var(--ink-faint);
  font-size: 15px;
}

.task-card.is-dragging {
  opacity: 0.35;
}

.task-card.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(32, 32, 32, 0.08);
}

.task-card.is-done {
  background: rgba(246, 246, 246, 0.72);
}

.task-card.is-done .task-title-text {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.task-grip {
  width: 16px;
  height: 16px;
  margin-left: 8px;
  color: var(--ink-faint);
  cursor: grab;
}

.task-grip svg {
  stroke-width: 2.2;
}

.task-checkbox {
  display: grid;
  width: 20px;
  height: 20px;
  margin-left: 3px;
  padding: 0;
  place-items: center;
  border: 1.5px solid #aaaaaa;
  border-radius: 6px;
  background: #fff;
  color: #fff;
  cursor: pointer;
}

.task-checkbox:hover {
  border-color: var(--accent);
}

.task-checkbox.is-blocked,
.task-checkbox.is-blocked:hover {
  border-color: #cfcfcf;
  border-style: dashed;
  background: #f5f5f5;
  color: var(--ink-faint);
  cursor: not-allowed;
}

.task-checkbox.is-checked {
  border-color: var(--success);
  background: var(--success);
}

.task-checkbox svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-dependency-control {
  display: inline-grid;
  max-width: min(100%, 310px);
  min-height: 25px;
  grid-template-columns: 14px minmax(0, auto);
  align-items: center;
  gap: 5px;
  margin: 3px 0 1px;
  padding: 2px 8px 2px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #f7f7f7;
  color: var(--ink-soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.task-dependency-control:hover {
  border-color: #d0d0d0;
  background: #f1f1f1;
  color: var(--ink);
}

.task-dependency-control.is-empty {
  border-style: dashed;
  background: transparent;
  color: var(--ink-faint);
}

.task-dependency-control.is-blocked {
  background: #f1f1f1;
  color: #5e5e5e;
}

.task-dependency-control.is-ready {
  color: #858585;
}

.task-dependency-icon {
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
}

.task-dependency-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-dependency-name {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 640;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 15px 10px 15px 4px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
}

.task-title-editor {
  min-width: 1px;
  max-width: 100%;
  border-radius: 3px;
  cursor: text;
  overflow-wrap: anywhere;
}

.task-title-editor:focus {
  outline: 3px solid rgba(32, 32, 32, 0.07);
  background: rgba(255, 255, 255, 0.72);
}

.task-title-editor strong {
  font-weight: 750;
}

.task-title small {
  color: var(--ink-faint);
  font-size: 12px;
}

.task-card-meta {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 9px;
}

.task-card > .task-assignee-control {
  z-index: 2;
  justify-self: end;
  margin-right: 8px;
}

.task-card > .task-open-link::after {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 53px;
  border-radius: 0 11px 11px 0;
  content: "";
}

.task-card > .task-open-link:focus-visible::after {
  outline: 2px solid var(--ink);
  outline-offset: -3px;
}

.task-assignee-control {
  position: relative;
  display: inline-grid;
  max-width: 210px;
  min-height: 30px;
  grid-template-columns: 22px minmax(0, auto) 14px;
  align-items: center;
  gap: 6px;
  padding: 3px 7px 3px 4px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #f7f7f7;
  color: var(--ink-soft);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.task-assignee-control:hover {
  border-color: #d2d2d2;
  background: #f2f2f2;
  color: var(--ink);
}

.task-assignee-control:focus-within {
  border-color: #a8a8a8;
  box-shadow: 0 0 0 3px rgba(32, 32, 32, 0.07);
  color: var(--ink);
}

.task-assignee-control.is-unassigned {
  border-style: dashed;
  background: transparent;
  color: var(--ink-faint);
}

.task-assignee-control.is-external {
  border-color: #c9bda8;
  background: #f5f0e7;
  color: #594c3b;
}

.task-assignee-control.is-external .task-assignee-avatar {
  background: #ded1bc;
  color: #584a37;
}

.task-assignee-avatar {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #e3e3e3;
  color: #5f5f5f;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: -0.015em;
  line-height: 1;
}

.task-assignee-control.is-unassigned .task-assignee-avatar {
  border: 1px solid var(--line);
  background: var(--paper-strong);
  color: var(--ink-faint);
}

.task-assignee-avatar svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-assignee-name {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-assignee-chevron {
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  color: var(--ink-faint);
}

.task-assignee-chevron svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-assignee-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}

.task-assignee-select:focus {
  outline: 0;
}

.task-open-link {
  display: grid;
  width: 34px;
  height: 100%;
  place-items: center;
  color: var(--ink-faint);
  font-size: 21px;
  line-height: 1;
  text-decoration: none;
}

.task-open-link:hover,
.task-open-link:focus-visible {
  color: var(--ink);
  background: var(--sidebar-hover);
}

.task-back-link {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}

.task-back-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.task-detail-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 30px;
}

.task-detail-heading .task-checkbox {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 8px 0 0;
}

.task-detail-heading h1 {
  margin: 0;
  font-size: clamp(30px, 4.5vw, 48px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.task-notes-field {
  margin-bottom: 28px;
}

.task-assignee-field,
.task-status-field,
.task-dependency-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.task-assignee-field label,
.task-status-field label,
.task-dependency-field label {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 680;
}

.task-assignee-field .task-assignee-control,
.task-status-field .task-assignee-control {
  min-height: 36px;
  background: var(--paper-strong);
}

.task-dependency-field .task-dependency-control {
  min-height: 36px;
  margin: 0;
  padding-right: 11px;
  padding-left: 9px;
  background: var(--paper-strong);
}

.task-notes-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 680;
}

.task-notes-field .task-notes-rich-text {
  display: block;
  width: 100%;
  min-height: 150px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.55;
}

.task-notes-field .task-notes-rich-text:focus {
  border-color: #a8a8a8;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(32, 32, 32, 0.06);
}

.task-file-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
}

.task-file-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
}

.task-file-add svg,
.task-attachment-preview svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.task-file-hint {
  color: var(--ink-faint);
  font-size: 12px;
}

.task-attachments {
  margin-top: 22px;
}

.task-attachments h2 {
  margin: 0 0 9px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 680;
}

.task-attachment-list {
  display: grid;
  gap: 7px;
}

.task-attachment-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--paper-strong);
}

.task-attachment-preview {
  display: grid;
  overflow: hidden;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-soft);
}

.task-attachment-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-attachment-copy {
  display: flex;
  overflow: hidden;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.task-attachment-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-attachment-copy > span {
  color: var(--ink-faint);
  font-size: 11px;
}

.task-attachment-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.task-attachment-remove {
  color: var(--danger);
}

.subtask-composer {
  margin-bottom: 24px;
}

.subtask-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subtask-card {
  display: grid;
  min-height: 52px;
  grid-template-columns: 34px minmax(0, 1fr) minmax(130px, 180px) 34px;
  align-items: center;
  padding-left: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--paper-strong);
}

.subtask-card .task-checkbox {
  margin-left: 0;
}

.subtask-card.is-done {
  background: rgba(246, 246, 246, 0.72);
}

.subtask-card.is-done .subtask-title {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.subtask-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 10px 10px 10px 0;
}

.subtask-title {
  max-width: 100%;
  padding: 0;
  font-size: 15px;
  line-height: 1.4;
}

.task-detail-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.task-empty {
  padding: 35px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-faint);
  font-size: 14px;
  text-align: center;
}

.reference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -16px 0 34px 25px;
}

.reference-system-links {
  margin-bottom: 34px;
}

.reference-system-links .section-divider {
  margin-top: 54px;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 54px 0 24px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line-soft);
  content: "";
}

.subpage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.subpage-card {
  display: flex;
  min-height: 60px;
  align-items: center;
  gap: 13px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-strong);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.subpage-card:hover {
  border-color: #c7c7c7;
  box-shadow: 0 8px 23px rgba(32, 32, 32, 0.055);
  transform: translateY(-1px);
}

.subpage-card .page-link-icon {
  background: #f0f0f0;
  color: var(--ink-soft);
}

.subpage-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.subpage-card span {
  color: var(--ink-faint);
  font-size: 12px;
}

.subpage-card .reference-page-card-title {
  display: block;
  font-size: 14px;
  font-weight: 400;
}

.reference-file-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-self: stretch;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
}

.reference-file-main > span:last-child {
  min-width: 0;
}

.reference-file-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-file-card > .file-block-actions {
  margin-left: auto;
}

.reference-file-card .toolbar-button span {
  color: inherit;
  font-size: inherit;
}

.reference-file-card .delete-button {
  flex: 0 0 30px;
  margin: 0;
  opacity: 0.62;
}

.reference-file-card:hover .delete-button,
.reference-file-card:focus-within .delete-button {
  opacity: 1;
}

.reference-file-card.is-editing:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

.page-dialog {
  width: min(92vw, 470px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  background: var(--paper-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.page-dialog::backdrop {
  background: rgba(28, 28, 28, 0.35);
  backdrop-filter: blur(3px);
}

.page-dialog form {
  position: relative;
  padding: 31px;
}

.page-dialog h2 {
  margin: 8px 0 25px;
  font-family: inherit;
  font-size: 30px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.page-dialog label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.page-dialog input,
.page-dialog select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 13px;
  color: var(--ink);
  font-size: 15px;
}

.page-dialog input:focus,
.page-dialog select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(32, 32, 32, 0.09);
}

.page-dialog .task-settings-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f8f8;
  color: var(--ink);
  cursor: pointer;
}

.page-dialog .task-settings-choice input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #333333;
}

.task-settings-choice > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.task-settings-choice strong {
  font-size: 14px;
  line-height: 1.35;
}

.task-settings-choice small {
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.dependency-dialog-help {
  margin: 10px 2px 0;
  color: var(--ink-faint);
  font-size: 13px;
  line-height: 1.5;
}

.external-assignee-dialog {
  width: min(94vw, 620px);
}

.external-assignee-dialog label:not(:first-of-type) {
  margin-top: 14px;
}

.external-assignee-dialog label span {
  color: var(--ink-faint);
  font-weight: 500;
}

.external-assignee-dialog .is-hidden {
  display: none;
}

.external-assignee-list-section {
  margin-top: 29px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.external-assignee-list-section h3 {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.external-assignee-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.external-assignee-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
}

.external-assignee-row.is-inactive {
  opacity: 0.62;
}

.external-assignee-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.external-assignee-copy strong,
.external-assignee-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.external-assignee-copy strong {
  font-size: 13px;
}

.external-assignee-copy span,
.external-assignee-empty {
  color: var(--ink-faint);
  font-size: 12px;
}

.external-assignee-empty {
  margin: 0;
  padding: 10px 0;
}

.external-assignee-actions {
  display: flex;
  gap: 5px;
}

.external-assignee-actions .button {
  padding: 6px 9px;
  font-size: 11px;
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 23px;
}

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

.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 80;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sidebar-scrim {
  display: none;
}

/* Inloggning */
.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(32, 32, 32, 0.055), transparent 28rem),
    radial-gradient(circle at 88% 88%, rgba(96, 96, 96, 0.04), transparent 25rem),
    var(--paper);
}

.login-shell {
  width: min(100%, 470px);
}

.login-panel {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 16px rgba(34, 34, 34, 0.025);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 55px;
  text-align: center;
}

.login-heading {
  margin-bottom: 28px;
}

.login-heading h1 {
  margin: 10px 0 12px;
  font-family: inherit;
  font-size: clamp(34px, 8vw, 46px);
  font-weight: 680;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.login-heading > p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.login-form label {
  margin: 0 0 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 680;
}

.login-form input {
  width: 100%;
  height: 48px;
  margin-bottom: 19px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 13px;
  background: var(--paper-strong);
  color: var(--ink);
  font-size: 16px;
}

.login-form input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(32, 32, 32, 0.09);
}

.login-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 5px;
  font-size: 15px;
}

.form-message {
  margin: 0 0 22px;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.45;
}

.form-message-error {
  border: 1px solid #cfcfcf;
  background: #eeeeee;
  color: #333333;
}

.login-support {
  margin: 18px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}

/* Vision och värde */
.vision-view [hidden] {
  display: none !important;
}

.vision-view .page-heading h1,
.vision-view .vision-section-heading h2:not(.vision-project-heading),
.vision-view .scenario-card h3 {
  letter-spacing: 0.01em;
}

.vision-view .vision-project-heading {
  letter-spacing: normal;
}

.vision-section {
  margin-bottom: 64px;
}

.page-heading.vision-page-heading {
  padding-left: 0;
}

.page-heading.vision-page-heading::before {
  display: none;
}

.vision-section-heading {
  max-width: 760px;
  margin-bottom: 20px;
}

.vision-section-heading h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.vision-section-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

.vision-question {
  display: block;
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 680;
  line-height: 1.45;
}

.vision-textarea,
.vision-field input,
.vision-field .vision-rich-text {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-strong);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

.vision-textarea {
  min-height: 190px;
  padding: 15px 16px;
  resize: vertical;
}

.vision-textarea[aria-disabled="true"] {
  opacity: 1;
}

.important-examples {
  margin: 10px 2px 0;
  color: var(--ink-faint);
  font-size: 14px;
  line-height: 1.55;
}

.important-examples strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-weight: 680;
}

.important-examples ul {
  margin: 0;
  padding-left: 20px;
}

.important-examples li + li {
  margin-top: 3px;
}

.vision-field {
  display: block;
}

.vision-field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
}

.vision-field-help {
  margin: 0 0 10px;
  color: var(--ink-faint);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
}

.vision-field input,
.vision-field .vision-rich-text.is-single-line {
  min-height: 45px;
  padding: 9px 11px;
}

.vision-field .vision-rich-text {
  min-height: 108px;
  padding: 11px;
}

.vision-field input::placeholder {
  color: var(--ink-faint);
}

.vision-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.vision-form-actions-end {
  justify-content: flex-end;
}

.vision-delete-button {
  margin-right: auto;
}

.vision-form-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 14px;
}

.scenario-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-strong);
}

.scenario-card {
  padding: 19px;
}

.scenario-card h3 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

.scenario-summary {
  display: block;
  color: inherit;
  text-decoration: none;
}

.scenario-card-header > .scenario-card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: .5rem;
  flex-wrap: wrap;
}

.scenario-summary:hover,
.scenario-summary:focus-visible {
  border-color: currentColor;
}

.scenario-summary small {
  color: var(--muted, #666);
}

.scenario-summary h3 {
  margin-bottom: 0;
}

.scenario-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.scenario-card-header > div {
  min-width: 0;
}

.scenario-card-header small {
  display: block;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scenario-edit-button {
  flex: 0 0 auto;
}

.scenario-detail {
  margin: 17px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 16px;
  line-height: 1.65;
}

.scenario-detail + .scenario-detail {
  margin-top: 13px;
  padding-top: 0;
  border-top: 0;
}

.scenario-detail strong,
.scenario-detail span {
  display: block;
}

.scenario-detail strong {
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 700;
}

.scenario-detail span {
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.scenario-card.is-editing .scenario-card-header {
  margin-bottom: 17px;
}

.scenario-composer {
  background: #f7f7f7;
}

.scenario-composer h3 {
  margin-bottom: 17px;
}

.scenario-add-row {
  display: flex;
  justify-content: flex-end;
}

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

.scenario-fields .vision-field:nth-child(n + 3) {
  grid-column: 1 / -1;
  margin-top: 8px;
}

@media (max-width: 820px) {
  .sidebar {
    width: min(86vw, 300px);
    transform: translateX(-102%);
    transition: transform 200ms ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    border: 0;
    background: rgba(29, 29, 29, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body.sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .main-area {
    margin-left: 0;
  }

  .save-state {
    bottom: 14px;
    left: 18px;
  }

  .task-settings-footer {
    bottom: 18px;
    left: 22px;
  }

  .is-task-list-view .save-state {
    left: 80px;
  }

  .mobile-menu-button {
    display: grid;
  }

  .topbar {
    padding: 0 17px;
  }

  .content-frame {
    padding: 52px 28px 90px;
  }
}

@media (max-width: 560px) {
  .content-frame {
    padding: 42px 18px 80px;
  }

  .page-heading {
    margin-bottom: 32px;
    padding-left: 17px;
  }

  .page-heading h1 {
    font-size: 39px;
  }

  .page-heading p:last-child {
    font-size: 15px;
  }

  .heading-row {
    display: block;
  }

  .surface-meta {
    margin: -20px 0 32px 17px;
  }

  .task-composer {
    grid-template-columns: 1fr;
  }

  .task-composer .button {
    width: 100%;
  }

  .task-composer .task-assignee-control {
    max-width: none;
  }

  .task-filter-control {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .task-filter-select-wrapper,
  .task-filter-select {
    width: 100%;
  }

  .external-assignee-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .external-assignee-actions {
    grid-column: 1 / -1;
  }

  .external-assignee-actions .button {
    flex: 1;
  }

  .task-card > .task-assignee-control {
    max-width: 120px;
    margin-right: 2px;
  }

  .message-card > header,
  .message-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .message-recipient-list {
    grid-template-columns: 1fr;
  }

  .message-composer {
    padding: 19px;
  }

  .message-card > header {
    gap: 9px;
  }

  .message-meta {
    gap: 3px;
  }

  .message-composer-actions,
  .message-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .message-composer-actions .button,
  .message-card-actions .button {
    width: 100%;
  }

  .message-card-actions .message-read-time {
    margin: 0 0 3px;
    text-align: center;
  }

  .message-receipts li,
  .inbox-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .scenario-fields {
    grid-template-columns: 1fr;
  }

  .scenario-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .scenario-fields .vision-field:nth-child(n + 3) {
    grid-column: auto;
  }

  .vision-form-actions .button {
    flex: 1 1 auto;
  }

  .vision-delete-button {
    margin-right: 0;
  }

  .message-conversation {
    margin-right: 12px;
    margin-left: 12px;
    padding: 13px;
  }

  .message-edit-conflict-draft,
  .message-edit-conflict-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .message-edit-conflict-draft {
    margin-right: 12px;
    margin-left: 12px;
  }

  .message-comment.is-mine {
    margin-left: 12px;
  }

  .reference-actions {
    margin-left: 17px;
  }

  .reference-link-action {
    display: none;
  }

  .block-row {
    grid-template-columns: 25px minmax(0, 1fr) 30px;
  }

  .file-block,
  .file-rename-form {
    flex-wrap: wrap;
  }

  .file-block > .file-block-actions {
    width: calc(100% - 51px);
    justify-content: flex-end;
    margin-left: 51px;
  }

  .file-rename-form .file-block-actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }

  .reference-file-card {
    flex-wrap: wrap;
  }

  .reference-file-card > .reference-file-main,
  .reference-file-card > .file-block-actions {
    width: 100%;
  }

  .reference-file-card > .file-block-actions {
    justify-content: flex-end;
    margin-left: 0;
  }

  .task-file-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-attachment-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .task-attachment-preview {
    width: 42px;
    height: 42px;
  }

  .task-attachment-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .subtask-card {
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .subtask-card .task-assignee-control {
    grid-column: 2;
    justify-self: start;
    margin-top: 5px;
  }

  .subtask-card .delete-button {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .block-icon {
    width: 25px;
  }

  .delete-button {
    opacity: 0.62;
  }

  .page-dialog form {
    padding: 26px 22px 22px;
  }

  .login-page {
    padding: 14px;
  }

  .login-panel {
    padding: 28px 22px;
  }

  .login-brand {
    margin-bottom: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.message-notification-setting {
  flex: 0 0 auto;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.5;
}
.message-notification-setting label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.message-notification-setting input { flex-shrink: 0; margin-top: 3px; }
.message-notification-setting small { display: block; margin-top: 4px; overflow-wrap: anywhere; }

.reference-page-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.reference-page-footer .delete-button { opacity: 1; }


.toast.toast-success { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }

.message-card[id] { scroll-margin-top: 90px; }

.scenario-comments { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border, #deded8); }
.scenario-comments h4 { margin: 0 0 1rem; }
.scenario-comment { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border, #deded8); }
.scenario-comment time { margin-left: .75rem; font-size: .85rem; color: var(--muted, #666); }
.scenario-comment p { white-space: pre-wrap; overflow-wrap: anywhere; }
.scenario-comments form { display: grid; gap: .75rem; }
.scenario-comments form > button { justify-self: end; }
.scenario-comments textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-strong);
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}
.scenario-comments textarea::placeholder { color: var(--ink-faint); }
.scenario-comments textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.file-attachment-link {
  padding: 12px;
  overflow-wrap: anywhere;
  text-align: center;
}

.pwa-install {
  margin: 1rem 0;
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.pwa-install summary { cursor: pointer; }
.pwa-install p { margin: 0.75rem 0; }
.pwa-install [hidden], .pwa-install[hidden] { display: none; }

.file-preview-dialog {
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  height: min(900px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line, #ddd);
  border-radius: 14px;
  color: var(--ink);
  background: #f2f3f5;
}
.file-preview-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.file-preview-dialog[open] { display: flex; flex-direction: column; }
.file-preview-header { display: flex; flex-shrink: 0; align-items: center; gap: 12px; padding: 16px 20px; background: white; border-bottom: 1px solid #ddd; }
.file-preview-header h2 { flex: 1; min-width: 0; margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.file-preview-header .toolbar-button { flex-shrink: 0; }
.file-preview-content { flex: 1; min-height: 0; overflow: auto; padding: 24px; }
.file-document-preview { max-width: 820px; margin: 0 auto; padding: 48px; background: white; color: #222; box-shadow: 0 2px 12px #0001; font: 16px/1.65 system-ui, sans-serif; overflow-wrap: anywhere; }
pre.file-document-preview { white-space: pre-wrap; }
.file-document-preview p { margin: 0 0 1em; white-space: pre-wrap; }
.file-document-preview h1, .file-document-preview h2, .file-document-preview h3 { margin: 1em 0 .5em; line-height: 1.25; }
.file-document-preview ul { margin: .4em 0; padding-left: 1.6em; }
.file-document-preview table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.file-document-preview td { border: 1px solid #ddd; padding: 8px 12px; vertical-align: top; }
.file-preview-content > iframe { width: 100%; height: 100%; border: 0; background: white; }
.file-preview-content > img { display: block; max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
@media (max-width: 600px) {
  .file-preview-header { flex-wrap: wrap; padding: 12px; }
  .file-preview-header h2 { flex-basis: 100%; }
  .file-preview-content { padding: 12px; }
  .file-document-preview { padding: 20px; }
}

.task-attachment-card.has-image-preview { grid-template-columns: 220px minmax(0, 1fr) auto; padding: 12px; gap: 18px; }
.has-image-preview .task-attachment-preview { width: 220px; height: 160px; padding: 0; border: 1px solid var(--line-soft); cursor: zoom-in; }
.has-image-preview .task-attachment-preview img { object-fit: contain; }
.has-image-preview .task-attachment-preview:hover { border-color: var(--ink-soft); }
.has-image-preview .task-attachment-preview:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 700px) {
  .task-attachment-card.has-image-preview { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .has-image-preview .task-attachment-preview { width: 100%; height: 220px; }
  .has-image-preview .task-attachment-actions { flex-wrap: wrap; }
  .has-image-preview .task-attachment-copy strong { white-space: normal; overflow-wrap: anywhere; }
}

button.task-attachment-preview { padding: 0; border: 1px solid var(--line-soft); cursor: pointer; }
button.task-attachment-preview:hover { border-color: var(--ink-soft); }
button.task-attachment-preview:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.task-status-control {
  max-width: 100%;
  grid-template-columns: minmax(0, auto) 14px;
  padding: 3px 11px;
}

.task-status-field {
  margin-top: 28px;
}

.task-status-control .task-assignee-name {
  white-space: normal;
  overflow-wrap: anywhere;
}

.task-after-tests-section {
  margin-bottom: 1.5rem;
}

.task-completed-section:not([open]):not(.task-after-tests-section) + .task-later-section > .task-section-toggle {
  margin-top: 4px;
}


.profile-link {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.profile-link:hover, .profile-link.active { background: var(--sidebar-hover); }
.profile-link-copy { display: flex; min-width: 0; flex-direction: column; }
.profile-link-copy strong { overflow-wrap: anywhere; }
.profile-view { max-width: 720px; margin: 0 auto; }
.profile-view > p { color: var(--ink-soft); }
.profile-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.profile-section h2 { font-size: 18px; }
.profile-detail { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.profile-detail h3 { margin: 0 0 6px; font-size: 14px; }
.profile-detail p { margin: 0; overflow-wrap: anywhere; }
.profile-detail > div { min-width: 0; }
.profile-detail .button { flex-shrink: 0; }
.profile-section .message-notification-setting { padding: 8px 0; font-size: 14px; }
.profile-logout { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 520px) {
  .profile-detail { align-items: flex-start; flex-direction: column; }
}

/* Tables pasted into rich text keep their rows and columns. */
:is(.text-block, .shortcut-rich-text, .rich-text-block) table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.75em 0;
  white-space: normal;
  table-layout: fixed;
}

:is(.text-block, .shortcut-rich-text, .rich-text-block) :is(th, td) {
  border: 1px solid currentColor;
  padding: 0.45em 0.65em;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.scenario-summary-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-strong);
  overflow: hidden;
}
.scenario-summary-row .scenario-summary { border: 0; border-radius: 0; }
.scenario-completion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.scenario-summary-row > .scenario-completion { margin: 0; padding: 0 19px 16px; }
.scenario-summary-row.is-complete, .scenario-card.is-complete {
  border-left: 4px solid #409365;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.scenario-summary-row.is-complete .scenario-summary :is(small, h3),
.scenario-card.is-complete :is([data-scenario-number], [data-scenario-heading]) {
  opacity: .6;
}

.scenario-summary-row { position: relative; }
.scenario-summary-row:has(.scenario-grip) { padding-left: 30px; }
.scenario-grip {
  position: absolute;
  left: 8px;
  top: 20px;
  width: 24px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--muted);
  touch-action: auto;
}
.scenario-grip svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.scenario-grip:focus-visible { outline: 2px solid currentColor; border-radius: 4px; }
.scenario-summary-row.is-dragging { opacity: .5; }
.scenario-summary-row.drop-before { box-shadow: 0 -3px 0 var(--ink); }
.scenario-summary-row.drop-after { box-shadow: 0 3px 0 var(--ink); }
