:root {
  --main-menu-height: 52px;
  --main-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --main-font-size: 16px;
  --main-color: #303840;
  --main-margin: 10px;
  --lattice-theme-color: #27a889;
  --lattice-theme-color-highlight: #1e856d;
  --lattice-background: #f4f6f8;
  --lattice-panel-background: #ffffff;
  --lattice-button-background: #dddddd;
  --lattice-button-background-highlight: #cecece;
  --lattice-button-color: #555555;
  --lattice-line: #d7d7d7;
  --jse-theme-color: var(--lattice-theme-color);
  --jse-theme-color-highlight: #94b579;
  --jse-font-family: var(--main-font-family);
  --jse-font-size: 16px;
  --jse-font-family-mono: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
  --jse-font-size-mono: 14px;
  --jse-padding: 10px;
  --jse-key-color: #222222;
  --jse-value-color-string: #008000;
  --jse-value-color-number: #ed1c24;
  --jse-value-color-boolean: #ff6500;
  --jse-value-color-null: #008000;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

html {
  overflow: hidden;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--main-color);
  background: var(--lattice-background);
  font-family: var(--main-font-family);
  font-size: var(--main-font-size);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--main-menu-height);
  padding: 6px 14px;
  color: #ffffff;
  background: #171c22;
  border-bottom: 2px solid #27a889;
  box-shadow: 0 2px 8px rgba(19, 25, 31, 0.28);
}

.brand {
  display: flex;
  align-items: center;
  min-width: max-content;
  color: #ffffff;
  gap: 9px;
  text-decoration: none;
}

.brand strong {
  color: #50cfb1;
  font-weight: 700;
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 1;
}

.brand-copy small {
  margin-top: 4px;
  color: #a9b3bc;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.site-nav button {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 6px 11px;
  color: #dce2e7;
  background: transparent;
  border-radius: 4px;
  gap: 6px;
  white-space: nowrap;
}

.nav-icon {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.settings-icon {
  border: 3px dotted currentColor;
  border-radius: 50%;
}

.settings-icon::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: -3px 1px 0 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.site-nav button:hover,
.site-nav button:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.site-nav .sign-in {
  order: 10;
  margin-left: 10px;
  color: #eafbf7;
  background: #207b68;
  border: 1px solid #38bea0;
}

.site-nav .sign-in:hover,
.site-nav .sign-in:focus-visible {
  color: #ffffff;
  background: #29977f;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 140px minmax(300px, 1fr);
  width: 100%;
  height: calc(100vh - var(--main-menu-height));
  min-height: 0;
  padding: 10px 4px 0;
  background: var(--lattice-background);
}

.document-panel {
  position: relative;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--lattice-panel-background);
  container-type: inline-size;
}

.document-panel.has-focus {
  z-index: 1;
}

.document-menu {
  position: relative;
  display: flex;
  min-width: 0;
  height: 42px;
  color: #28323b;
  background: #f9fbfc;
  border-top: 3px solid var(--lattice-theme-color);
  border-bottom: 1px solid #dce3e8;
  --copy-icon-background: #f9fbfc;
}

.document-menu button,
.file-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 10px;
  color: #42505b;
  background: transparent;
  border-radius: 0;
  white-space: nowrap;
}

.document-menu button:hover,
.document-menu button:focus-visible,
.file-action:hover,
.file-action:focus-within {
  color: #172129;
  background: #e9f0f2;
  outline: none;
}

.document-menu button[aria-expanded="true"] {
  color: #125d4e;
  background: #def2ed;
}

.document-name {
  flex: 1;
  justify-content: flex-start;
  overflow: hidden;
  text-align: left;
}

.document-name [data-document-name] {
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-actions {
  display: flex;
  min-width: 0;
  margin-left: auto;
}

.document-actions button,
.document-actions .file-action {
  flex: none;
}

.file-action {
  cursor: pointer;
}

.tool-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: currentColor;
}

.new-icon {
  width: 12px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 1px;
}

.new-icon::after {
  content: "+";
  position: absolute;
  right: -7px;
  bottom: -6px;
  display: grid;
  place-items: center;
  width: 11px;
  height: 11px;
  color: var(--lattice-theme-color);
  background: #f9fbfc;
  border-radius: 50%;
  font: 700 11px/1 Arial, sans-serif;
}

.open-icon {
  width: 16px;
  height: 11px;
  margin-top: 4px;
  border: 2px solid currentColor;
  border-radius: 1px;
}

.open-icon::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -2px;
  width: 8px;
  height: 5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.save-icon {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.save-icon::before,
.save-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  width: 6px;
  background: currentColor;
}

.save-icon::before { top: 0; height: 4px; }
.save-icon::after { bottom: 1px; height: 4px; border-radius: 4px 4px 0 0; }

.copy-icon::before,
.copy-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.copy-icon::before { left: 0; top: 0; opacity: 0.65; }
.copy-icon::after { left: 4px; top: 3px; background: var(--copy-icon-background, var(--lattice-theme-color)); }

.fullscreen-icon {
  background:
    linear-gradient(currentColor, currentColor) left top / 7px 2px no-repeat,
    linear-gradient(currentColor, currentColor) left top / 2px 7px no-repeat,
    linear-gradient(currentColor, currentColor) right top / 7px 2px no-repeat,
    linear-gradient(currentColor, currentColor) right top / 2px 7px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 7px 2px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 2px 7px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / 7px 2px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / 2px 7px no-repeat;
}

.edit-icon::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 7px;
  width: 4px;
  height: 13px;
  background: currentColor;
  border-radius: 2px 2px 1px 1px;
  transform: rotate(42deg);
}

.edit-icon::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 0;
  border: 3px solid transparent;
  border-top-color: currentColor;
  transform: rotate(-48deg);
}

.editor-host {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--jse-background-color, #ffffff);
}

.editor-host > .jse-main,
.editor-host .jse-main {
  flex: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.editor-host .jse-menu {
  --jse-theme-color: var(--lattice-theme-color);
  --jse-theme-color-highlight: #94b579;
}

.center-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 0 10px;
  color: var(--main-color);
  background: var(--lattice-background);
  border-left: 1px solid #e0e5e9;
  border-right: 1px solid #e0e5e9;
}

.empty-space-top {
  flex: 0 0 124px;
}

.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-splitter {
  position: absolute;
  left: 50%;
  bottom: clamp(90px, 20vh, 180px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 72px;
  padding: 0;
  color: #a9a9a9;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: ew-resize;
  touch-action: none;
  transform: translateX(-50%);
}

.panel-splitter span,
.panel-splitter span::before,
.panel-splitter span::after {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}

.panel-splitter span {
  position: relative;
  display: block;
}

.panel-splitter span::before,
.panel-splitter span::after {
  content: "";
  position: absolute;
  left: 0;
}

.panel-splitter span::before { top: -8px; }
.panel-splitter span::after { top: 8px; }

.panel-splitter:hover,
.panel-splitter:focus-visible {
  color: #6f6f6f;
  outline: none;
}

.panel-splitter:focus-visible {
  box-shadow: inset 0 0 0 1px #9a9a9a;
}

.is-resizing-panels,
.is-resizing-panels * {
  cursor: ew-resize !important;
  user-select: none !important;
}

.action-group {
  display: flex;
  flex-direction: column;
}

.action-group-name,
.diff-counter {
  min-height: 29px;
  padding: 0 0 5px;
  text-align: center;
  white-space: nowrap;
}

.action-buttons {
  display: flex;
  gap: 5px;
}

.panel-actions button {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 8px 12px;
  color: var(--lattice-button-color);
  background: #ffffff;
  border: 1px solid #cfd7dd;
  border-radius: 4px;
  font-size: 22px;
  line-height: 1;
}

.panel-actions button:hover,
.panel-actions button:focus-visible {
  color: #176e5c;
  background: #e8f6f2;
  border-color: #8ac9ba;
  outline: none;
}

.panel-actions button:disabled {
  color: #999999;
  cursor: default;
  opacity: 0.65;
}

.panel-actions .compare-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  font-size: 16px;
}

.checkbox-icon {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid #666666;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  line-height: 12px;
}

.compare-button.is-active .checkbox-icon {
  color: #ffffff;
  background: #5c5c5c;
}

.diff-controls {
  gap: 0;
}

.diff-counter {
  overflow: hidden;
  text-overflow: ellipsis;
}

.drop-overlay {
  position: absolute;
  inset: 42px 0 0;
  z-index: 100;
  display: none;
  place-items: center;
  color: #4d4d4d;
  background: rgba(255, 255, 255, 0.88);
  border: 2px dashed #707070;
  font-size: 18px;
  font-weight: 600;
  pointer-events: none;
}

.document-panel.is-dragging .drop-overlay {
  display: grid;
}

.popup-menu {
  position: fixed;
  z-index: 5000;
  min-width: 220px;
  max-width: min(380px, calc(100vw - 12px));
  color: #ffffff;
  background: #656565;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}

.popup-menu.document-dropdown {
  --copy-icon-background: #ffffff;
  width: max-content;
  min-width: 0;
  color: #4d4d4d;
  background: #ffffff;
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.23);
}

.popup-menu.copy-menu {
  width: 224px;
}

.popup-menu.open-menu {
  width: 175px;
}

.popup-menu.save-menu {
  width: 166px;
}

.document-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 38px;
  padding: 8px 16px;
  color: #4d4d4d;
  background: transparent;
  border-radius: 0;
  text-align: left;
  white-space: nowrap;
}

.document-menu-item.separated {
  height: 45px;
  margin-top: 1px;
  border-top: 1px solid #e2e2e2;
}

.document-menu-item:hover,
.document-menu-item:focus-visible {
  --copy-icon-background: #eeeeee;
  background: #eeeeee;
  outline: none;
}

.menu-item-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: currentColor;
}

.menu-item-icon.copy-icon::before,
.menu-item-icon.copy-icon::after {
  width: 8px;
  height: 10px;
  border-width: 2px;
}

.menu-item-icon.copy-icon::before { left: 1px; top: 1px; }
.menu-item-icon.copy-icon::after { left: 5px; top: 4px; }

.menu-folder-icon {
  height: 11px;
  margin-top: 3px;
  background: currentColor;
  border-radius: 1px 2px 2px 2px;
}

.menu-folder-icon::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 1px;
  width: 8px;
  height: 5px;
  background: currentColor;
  border-radius: 2px 2px 0 0;
}

.menu-cloud-icon {
  width: 18px;
  height: 9px;
  margin-top: 6px;
  background: currentColor;
  border-radius: 7px;
}

.menu-cloud-icon::before,
.menu-cloud-icon::after {
  content: "";
  position: absolute;
  bottom: 2px;
  background: currentColor;
  border-radius: 50%;
}

.menu-cloud-icon::before {
  left: 3px;
  width: 10px;
  height: 12px;
}

.menu-cloud-icon::after {
  right: 1px;
  width: 8px;
  height: 8px;
}

.menu-disk-icon {
  height: 10px;
  margin-top: 2px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}

.menu-disk-icon::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -4px;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.menu-link-icon::before,
.menu-link-icon::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 10px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 6px;
  transform: rotate(-38deg);
}

.menu-link-icon::before { left: -1px; }
.menu-link-icon::after { right: -1px; }

.menu-csv-icon {
  border: 2px solid currentColor;
  border-radius: 2px;
  background:
    linear-gradient(currentColor, currentColor) 50% 0 / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 1px no-repeat;
}

.popup-message {
  padding: 12px 15px;
  line-height: 1.4;
}

.rename-form {
  display: flex;
  gap: 8px;
  padding: 10px;
}

.rename-form input {
  min-width: 0;
  width: 180px;
  padding: 6px 8px;
  color: #222222;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  outline: none;
}

.rename-form input:focus {
  border-color: var(--lattice-theme-color);
}

.rename-form button {
  padding: 6px 10px;
  color: #ffffff;
  background: var(--lattice-theme-color);
  border-radius: 3px;
}

.toast {
  position: fixed;
  top: 47px;
  left: 50%;
  z-index: 6000;
  max-width: min(520px, calc(100vw - 20px));
  padding: 7px 12px;
  color: #4d4d4d;
  background: #f4e285;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
}

.toast.error {
  color: #ffffff;
  background: #ee5341;
}

#settingsDialog {
  width: min(420px, calc(100vw - 24px));
  padding: 0;
  color: var(--main-color);
  background: #ffffff;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 5px 28px rgba(0, 0, 0, 0.35);
}

.app-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 24px));
  padding: 0;
  color: var(--main-color);
  background: #ffffff;
  border: 0;
  border-radius: 3px;
  box-shadow: 0 5px 28px rgba(0, 0, 0, 0.35);
}

.app-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.app-dialog-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.local-document-list {
  display: flex;
  flex-direction: column;
  max-height: min(480px, calc(100vh - 120px));
  overflow: auto;
  border-top: 1px solid #e0e0e0;
}

.local-document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  color: #4d4d4d;
  background: transparent;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 0;
  text-align: left;
}

.local-document-row:hover,
.local-document-row:focus-visible {
  background: #eeeeee;
  outline: none;
}

.local-document-name,
.local-document-id {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-document-name {
  font-weight: 600;
}

.local-document-id {
  color: #888888;
  font-size: 13px;
}

.dialog-empty {
  padding: 30px 10px;
  color: #888888;
  text-align: center;
}

.url-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.url-field input,
.url-field select {
  width: 100%;
  height: 38px;
  padding: 7px 9px;
  color: #222222;
  background: #ffffff;
  border: 1px solid #cccccc;
  outline: none;
}

.url-field input:focus,
.url-field select:focus {
  border-color: var(--lattice-theme-color);
}

.export-csv-dialog {
  width: min(720px, calc(100vw - 24px));
}

.csv-preview {
  width: 100%;
  height: min(360px, calc(100vh - 210px));
  min-height: 180px;
  padding: 10px;
  resize: vertical;
  color: #222222;
  background: #ffffff;
  border: 1px solid #cccccc;
  outline: none;
  font-family: var(--jse-font-family-mono);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre;
}

.csv-preview:focus {
  border-color: var(--lattice-theme-color);
}

.csv-meta {
  margin-top: -10px;
  color: #777777;
  font-size: 13px;
}

.dialog-status {
  min-height: 20px;
  color: #d64535;
  font-size: 14px;
}

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

.dialog-actions button {
  padding: 8px 16px;
  color: #4d4d4d;
  background: #dddddd;
  border-radius: 3px;
}

.dialog-actions .primary {
  color: #ffffff;
  background: var(--lattice-theme-color);
}

.dialog-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

#settingsDialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.dialog-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.dialog-title h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
}

.dialog-title button {
  width: 30px;
  height: 30px;
  color: #555555;
  background: transparent;
  font-size: 25px;
}

.settings-form label:not(.check-setting) {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 12px;
}

.settings-form select {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  color: inherit;
  background: #ffffff;
  border: 1px solid #cccccc;
}

.check-setting {
  display: flex;
  align-items: center;
  gap: 9px;
}

.settings-form .primary {
  align-self: flex-end;
  padding: 9px 22px;
  color: #ffffff;
  background: var(--lattice-theme-color);
  border-radius: 3px;
}

.popup-menu.nav-dropdown {
  min-width: 172px;
  padding: 6px;
  overflow: hidden;
  color: #edf2f5;
  background: #242b32;
  border: 1px solid #35404a;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(9, 13, 17, 0.3);
}

.popup-menu.settings-nav-menu {
  width: 172px;
}

.popup-menu.features-nav-menu {
  width: 226px;
}

.popup-menu.help-nav-menu,
.popup-menu.account-nav-menu {
  width: 220px;
}

.nav-menu-heading {
  display: flex;
  align-items: center;
  min-height: 27px;
  padding: 8px 10px 4px;
  color: #9fabb5;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  gap: 8px;
  color: #f5f5f5;
  background: transparent;
  border-radius: 3px;
  text-align: left;
  white-space: nowrap;
}

.features-nav-menu .nav-menu-item {
  min-height: 38px;
}

.nav-menu-item:hover,
.nav-menu-item:focus-visible {
  color: #ffffff;
  background: #303a44;
  outline: none;
}

.nav-menu-item.is-selected {
  color: #145c4d;
  background: #e8f6f2;
}

.nav-menu-item.is-selected:hover,
.nav-menu-item.is-selected:focus-visible {
  background: #f2fbf8;
}

.nav-menu-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.theme-system-icon,
.theme-light-icon,
.theme-dark-icon {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.theme-system-icon::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 0;
  background: currentColor;
}

.theme-light-icon::before {
  content: "";
  position: absolute;
  inset: 3px;
  background: currentColor;
  border-radius: 50%;
}

.theme-dark-icon {
  border: 0;
  background: currentColor;
}

.theme-dark-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #242b32;
  border-radius: 50%;
}

.nav-menu-item.is-selected .theme-dark-icon::after {
  background: #eeeeee;
}

.color-green,
.color-blue,
.color-red {
  border-radius: 50%;
}

.color-green { background: #27a889; }
.color-blue { background: #3d79d6; }
.color-red { background: #d45f52; }

.configure-icon {
  border: 3px dotted currentColor;
  border-radius: 50%;
}

.configure-icon::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.account-summary {
  display: flex;
  flex-direction: column;
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

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

.account-summary span {
  color: #d4d4d4;
  font-size: 13px;
}

.site-nav .sign-in.is-authenticated {
  max-width: 190px;
  overflow: hidden;
  color: #ffffff;
  background: transparent;
  text-overflow: ellipsis;
}

.site-nav .sign-in.is-authenticated:hover,
.site-nav .sign-in.is-authenticated:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.auth-choice-dialog {
  width: min(430px, calc(100vw - 24px));
}

.auth-choice-content {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #26313a;
  font-size: 14px;
  font-weight: 700;
}

.auth-brand img {
  width: 28px;
  height: 28px;
}

.auth-choice-content h2 {
  margin: 18px 0 16px;
  color: #1e2931;
  font-size: 24px;
  font-weight: 600;
}

.auth-choice-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid #e2e7ea;
}

.auth-choice-section p {
  margin: 0;
  color: #596670;
  font-size: 14px;
}

.auth-primary,
.auth-secondary {
  width: 168px;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 4px;
  font-weight: 600;
}

.auth-primary {
  color: #ffffff;
  background: #238f76;
}

.auth-secondary {
  color: #236a5a;
  background: #eef8f5;
  border: 1px solid #93cdbf;
}

.auth-primary:hover,
.auth-primary:focus-visible,
.auth-secondary:hover,
.auth-secondary:focus-visible {
  color: #ffffff;
  background: #1d7964;
  border-color: #1d7964;
  outline: none;
}

.auth-cancel {
  align-self: flex-end;
  min-height: 32px;
  margin-top: 12px;
  padding: 5px 10px;
  color: #65717a;
  background: transparent;
  border-radius: 4px;
}

.auth-cancel:hover,
.auth-cancel:focus-visible {
  color: #26313a;
  background: #edf1f3;
  outline: none;
}

.auth-form-dialog {
  width: min(430px, calc(100vw - 24px));
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field input {
  width: 100%;
  height: 38px;
  padding: 7px 9px;
  color: #222222;
  background: #ffffff;
  border: 1px solid #cccccc;
  outline: none;
}

.auth-field input:focus {
  border-color: var(--lattice-theme-color);
}

.free-plan {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 16px;
  padding: 16px;
  border: 1px solid #d8d8d8;
}

.free-plan > span {
  color: var(--lattice-theme-color-highlight);
  font-size: 20px;
  font-weight: 600;
}

.free-plan p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
}

.product-notice {
  margin: 0;
  color: #68747d;
  font-size: 13px;
  line-height: 1.45;
}

.help-content p {
  margin: 0 0 12px;
}

.help-content p:last-child {
  margin-bottom: 0;
}

.document-list-heading {
  padding: 8px 10px 6px;
  color: #777777;
  background: #f2f2f2;
  border-bottom: 1px solid #e0e0e0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.local-document-row {
  padding: 0;
  gap: 0;
}

.document-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 10px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.delete-document-button {
  width: 38px;
  height: 38px;
  margin-right: 5px;
  color: #888888;
  background: transparent;
  border-radius: 2px;
  font-size: 22px;
}

.delete-document-button:hover,
.delete-document-button:focus-visible {
  color: #ffffff;
  background: #d65a4a;
  outline: none;
}

.jse-theme-dark .auth-field input {
  color: #d4d4d4;
  background: #3d3d3d;
  border-color: #5a5a5a;
}

.jse-theme-dark .auth-brand,
.jse-theme-dark .auth-choice-content h2 {
  color: #edf2f5;
}

.jse-theme-dark .auth-choice-section {
  border-color: #4a545c;
}

.jse-theme-dark .auth-choice-section p,
.jse-theme-dark .product-notice {
  color: #b5c0c8;
}

.jse-theme-dark .auth-secondary {
  color: #91dbc9;
  background: #283d38;
  border-color: #477d70;
}

.jse-theme-dark .auth-cancel {
  color: #bec8cf;
}

.jse-theme-dark .auth-cancel:hover,
.jse-theme-dark .auth-cancel:focus-visible {
  color: #ffffff;
  background: #424b52;
}

.jse-theme-dark .document-menu {
  color: #e5ebef;
  background: #2c343b;
  border-bottom-color: #46515a;
  --copy-icon-background: #2c343b;
}

.jse-theme-dark .document-menu button,
.jse-theme-dark .document-menu .file-action {
  color: #dbe3e8;
}

.jse-theme-dark .document-menu button:hover,
.jse-theme-dark .document-menu button:focus-visible,
.jse-theme-dark .document-menu .file-action:hover,
.jse-theme-dark .document-menu .file-action:focus-within {
  color: #ffffff;
  background: #3a454e;
}

.jse-theme-dark .document-menu button[aria-expanded="true"] {
  color: #9ee3d2;
  background: #294a43;
}

.jse-theme-dark .new-icon::after {
  background: #2c343b;
}

.jse-theme-dark .free-plan {
  border-color: #4f4f4f;
}

.jse-theme-dark .document-list-heading {
  color: #bdbdbd;
  background: #383838;
  border-color: #4f4f4f;
}

.lattice-diff-create,
.lattice-diff-delete,
.lattice-diff-update {
  border-radius: 2px;
}

.lattice-diff-create {
  background: rgba(151, 204, 124, 0.42) !important;
  box-shadow: inset 3px 0 #66a34a;
}

.lattice-diff-delete {
  background: rgba(238, 83, 65, 0.22) !important;
  box-shadow: inset 3px 0 #d84a39;
}

.lattice-diff-update {
  background: rgba(244, 226, 133, 0.58) !important;
  box-shadow: inset 3px 0 #d5b82e;
}

.lattice-diff-current {
  outline: 2px solid #4f8edc !important;
  outline-offset: 1px;
}

.lattice-diff-blink {
  animation: diff-blink 900ms ease-out;
}

@keyframes diff-blink {
  0%, 45% { filter: brightness(0.75); }
  100% { filter: none; }
}

.jse-theme-dark {
  --lattice-background: #252525;
  --lattice-panel-background: #1e1e1e;
  --lattice-button-background: #4a4a4a;
  --lattice-button-background-highlight: #5b5b5b;
  --lattice-button-color: #e0e0e0;
  --main-color: #d4d4d4;
  --jse-theme: dark;
  --jse-background-color: #1e1e1e;
  --jse-text-color: #d4d4d4;
  --jse-text-color-inverse: #4d4d4d;
  --jse-main-border: 1px solid #4f4f4f;
  --jse-menu-color: #ffffff;
  --jse-modal-background: #2f2f2f;
  --jse-modal-overlay-background: rgba(0, 0, 0, 0.5);
  --jse-panel-background: #333333;
  --jse-panel-color: #d4d4d4;
  --jse-panel-color-readonly: #8d8d8d;
  --jse-panel-border: 1px solid #3c3c3c;
  --jse-context-menu-background: #4b4b4b;
  --jse-context-menu-background-highlight: #595959;
  --jse-context-menu-color: #d4d4d4;
  --jse-key-color: #9cdcfe;
  --jse-value-color: #d4d4d4;
  --jse-value-color-number: #b5cea8;
  --jse-value-color-boolean: #569cd6;
  --jse-value-color-null: #569cd6;
  --jse-value-color-string: #ce9178;
  --jse-selection-background-color: #464646;
  --jse-selection-background-inactive-color: #333333;
  --jse-hover-background-color: #343434;
  --jse-table-header-background: #333333;
  --jse-input-background: #3d3d3d;
  --jse-input-border: 1px solid #4f4f4f;
}

.jse-theme-dark #settingsDialog {
  color: #d4d4d4;
  background: #2f2f2f;
}

.jse-theme-dark .app-dialog {
  color: #d4d4d4;
  background: #2f2f2f;
}

.jse-theme-dark .local-document-list,
.jse-theme-dark .local-document-row {
  border-color: #4f4f4f;
}

.jse-theme-dark .local-document-row {
  color: #d4d4d4;
}

.jse-theme-dark .local-document-row:hover,
.jse-theme-dark .local-document-row:focus-visible {
  background: #454545;
}

.jse-theme-dark .url-field input,
.jse-theme-dark .url-field select,
.jse-theme-dark .csv-preview {
  color: #d4d4d4;
  background: #3d3d3d;
  border-color: #5a5a5a;
}

.jse-theme-dark .csv-meta {
  color: #aaaaaa;
}

.jse-theme-dark .popup-menu.document-dropdown {
  --copy-icon-background: #3d3d3d;
  color: #dedede;
  background: #3d3d3d;
}

.jse-theme-dark .document-menu-item {
  color: #dedede;
}

.jse-theme-dark .document-menu-item:hover,
.jse-theme-dark .document-menu-item:focus-visible {
  --copy-icon-background: #505050;
  background: #505050;
}

.jse-theme-dark .settings-form select {
  color: #d4d4d4;
  background: #3d3d3d;
  border-color: #5a5a5a;
}

.fullscreen-active .site-header,
.fullscreen-active .center-panel,
.fullscreen-active .document-panel:not(.is-fullscreen) {
  display: none;
}

.fullscreen-active .workspace {
  display: block;
  height: 100vh;
  padding: 0;
}

.fullscreen-active .document-panel.is-fullscreen {
  width: 100%;
  height: 100vh;
}

@media (max-width: 1180px) {
  .action-label {
    display: none;
  }

  .document-menu button,
  .file-action {
    gap: 0;
  }

  .site-nav button:nth-last-child(-n + 3) {
    display: none;
  }
}

@container (max-width: 620px) {
  .document-actions .action-label,
  .document-actions .caret {
    display: none;
  }

  .document-actions button,
  .document-actions .file-action {
    width: 38px;
    justify-content: center;
    padding-inline: 8px;
  }
}

@media (max-width: 820px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(520px, 70vh) auto minmax(520px, 70vh);
    height: auto;
    padding: 8px;
  }

  .center-panel {
    padding: 12px 0;
    border: 0;
  }

  .empty-space-top {
    display: none;
  }

  .panel-splitter {
    display: none;
  }

  .panel-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .diff-controls {
    grid-column: 1 / -1;
    width: min(220px, 100%);
    justify-self: center;
  }

  .popup-menu.document-dropdown {
    min-width: 0;
  }

  .document-menu-item {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .brand-copy small {
    display: none;
  }

  .site-nav #settingsButton {
    display: none;
  }

  .auth-choice-section {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .auth-primary,
  .auth-secondary {
    width: 100%;
  }
}
