.icon {
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

.btn .icon {
  margin-block: -1px;
}

.btn--quiet .icon,
.btn--icon .icon {
  color: inherit;
}

.topbar {
  gap: 8px;
}

.wordmark {
  cursor: default;
  flex: 0 0 auto;
}

.topbar__divider {
  width: 1px;
  height: 16px;
  background: var(--line);
  flex: 0 0 auto;
}

.topbar__name {
  max-width: 260px;
  min-width: 0;
  color: var(--ink);
  gap: 0;
}

.topbar__name__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 244px;
}

.topbar__menu-btn {
  flex-direction: row-reverse;
  gap: 4px;
}

.topbar__menu-btn .icon {
  color: var(--ink-4);
}

.topbar__menu-btn:hover .icon {
  color: var(--ink-2);
}

.topbar .btn[disabled] .icon {
  opacity: 0.55;
}

.workspace-host {
  position: relative;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
}

.workspace-slot {
  position: absolute;
  inset: 0;
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.workspace-slot > * {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.workspace-slot[hidden] {
  display: none;
}

.workspace-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--surface);
}

.workspace-fallback .empty {
  max-width: 360px;
  text-align: center;
}

.statusbar__spacer {
  flex: 1 1 auto;
  min-width: 8px;
}

.statusbar__group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.statusbar__group[hidden] {
  display: none;
}

.statusbar__group[hidden] + .statusbar__group {
  padding-left: 0;
  border-left: 0;
}

.statusbar__group + .statusbar__group {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  height: 12px;
}

.statusbar__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.field__stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.field__stack > .hint {
  padding-left: 92px;
}

.field__stack > .field--wide + .hint {
  padding-left: 0;
}

.field__label.scrub {
  cursor: ew-resize;
}

.field__label.scrub:hover {
  color: var(--ink);
}

.input--num:focus {
  cursor: text;
}

.input.is-mixed::placeholder {
  color: var(--ink-4);
}

.field__row--num {
  flex: 0 0 auto;
  width: 58px;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 40px;
  height: 22px;
  background: transparent;
  margin: 0;
  cursor: ew-resize;
}

.range:focus {
  outline: none;
}

.range::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--line-2);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 9px;
  height: 14px;
  margin-top: -6px;
  background: var(--surface);
  border: 1px solid var(--ink-3);
  border-radius: 1px;
}

.range:hover::-webkit-slider-thumb {
  border-color: var(--ink);
}

.range:focus-visible::-webkit-slider-thumb {
  border-color: var(--accent);
}

.range::-moz-range-track {
  height: 2px;
  background: var(--line-2);
}

.range::-moz-range-thumb {
  width: 8px;
  height: 13px;
  background: var(--surface);
  border: 1px solid var(--ink-3);
  border-radius: 1px;
}

.range:hover::-moz-range-thumb {
  border-color: var(--ink);
}

.color {
  width: 22px;
  height: 22px;
  padding: 0;
  flex: 0 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
}

.color:hover {
  border-color: var(--line-2);
}

.color::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color::-webkit-color-swatch {
  border: 0;
  border-radius: 0;
}

.color::-moz-color-swatch {
  border: 0;
  border-radius: 0;
}

.switch.is-mixed::after {
  transform: translateX(6px);
  background: var(--ink-4);
}

.seg__item .icon + span {
  margin-left: 4px;
}

.section__head {
  cursor: default;
}

.section__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
}

.section__toggle:hover {
  color: var(--ink);
}

.section__toggle .icon {
  color: var(--ink-4);
  transition: transform 90ms linear;
}

.section--collapsed .section__toggle .icon {
  transform: rotate(-90deg);
}

.section__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.menu__item[disabled] {
  color: var(--ink-4);
  cursor: default;
}

.menu__item[disabled]:hover {
  background: transparent;
}

.menu__item .icon {
  color: var(--ink-3);
}

.menu__item--danger:hover {
  color: var(--accent);
}

.menu__item--danger:hover .icon {
  color: var(--accent);
}

.menu__gap {
  width: 13px;
  flex: 0 0 auto;
}

.menu__item > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog__head {
  color: var(--ink);
}

.dialog__message {
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--ink);
}

.dialog__body .field {
  grid-template-columns: 116px 1fr;
}

.dialog__body .field__stack > .hint {
  padding-left: 124px;
}

.toast.is-ok {
  background: var(--ok);
  color: var(--paper);
}

.resizer.is-dragging,
.resizer:active {
  background: var(--accent);
}

body.is-resizing {
  cursor: col-resize;
  user-select: none;
}

.topbar__account {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  max-width: 150px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink-2);
  font-size: var(--fs-sm);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__account:hover {
  color: var(--ink);
  border-color: var(--line-2);
  background: var(--surface-2);
}

.acc-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acc-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  max-height: 46vh;
  overflow-y: auto;
}

.acc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 2px 9px 4px;
  border-bottom: 1px solid var(--line);
}

.acc-row.is-open {
  box-shadow: inset 2px 0 0 var(--accent);
  background: var(--accent-soft);
}

.acc-row__main {
  min-width: 0;
  flex: 1;
}

.acc-row__name {
  font-size: var(--fs-md);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-row__meta {
  color: var(--ink-3);
  font-size: var(--fs-xs);
  margin-top: 2px;
}

.acc-row__actions {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.tour {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

.tour-scrim__part {
  position: fixed;
  background: var(--scrim);
  pointer-events: auto;
}

.tour-scrim.is-full {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  pointer-events: auto;
}

.tour-ring {
  position: fixed;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  pointer-events: none;
}

.tour-panel {
  position: fixed;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  padding: 12px 14px 12px;
  pointer-events: auto;
}

.tour-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tour-panel__count {
  color: var(--ink-4);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
}

.tour-panel__skip {
  font-size: var(--fs-xs);
  height: 18px;
  padding: 0 4px;
  color: var(--ink-3);
}

.tour-panel__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.tour-panel__body {
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--ink-2);
}

.tour-panel__body b {
  color: var(--ink);
  font-weight: 500;
}

.tour-panel__body kbd {
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 0 4px;
  color: var(--ink);
  background: var(--surface-2);
}

.tour-panel__body code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink);
}

.tour-panel__foot {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

body.tour-open {
  overflow: hidden;
}

.topbar__help {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.narrow-note {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: flex-start;
  overflow-y: auto;
  padding: 56px 24px 40px;
  background: var(--paper);
}

.narrow-note[hidden] {
  display: none;
}

.narrow-note__body {
  max-width: 34ch;
}

.narrow-note__mark {
  font-family: var(--brand), var(--ui);
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 48px;
}

.narrow-note__lede {
  margin: 0 0 14px;
  font-family: var(--brand), var(--ui);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.narrow-note__text {
  margin: 0 0 28px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.narrow-note__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.narrow-note__actions .btn {
  height: 34px;
  padding: 0 14px;
  font-size: 14px;
}

.narrow-note__link {
  font-size: 14px;
  color: var(--ink-2);
  text-underline-offset: 3px;
}

.fallback {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  background: var(--paper);
  font-family: var(--ui);
  color: var(--ink);
}

.fallback__inner {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(56px, 10vw, 112px) 24px;
}

.fallback__mark {
  margin: 0 0 30px;
  font-family: var(--brand), var(--ui);
  font-size: 20px;
  letter-spacing: -0.01em;
}

.fallback__mark a {
  color: inherit;
  text-decoration: none;
}

.fallback__head {
  font-family: var(--brand), var(--ui);
  font-weight: 400;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.fallback__lede {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

.fallback__note {
  margin: 0 0 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-3);
}

.fallback__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14.5px;
}

.fallback__nav a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-2);
}

.fallback__nav a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
