@font-face {
  font-family: Inter;
  src: url("/static/fonts/inter-latin-400-normal.woff2");
}
@font-face {
  font-family: Inter;
  font-weight: 500;
  src: url("/static/fonts/inter-latin-500-normal.woff2");
}
@font-face {
  font-family: Inter;
  font-weight: 600;
  src: url("/static/fonts/inter-latin-600-normal.woff2");
}
@font-face {
  font-family: Inter;
  font-weight: 700;
  src: url("/static/fonts/inter-latin-700-normal.woff2");
}
:root {
  color-scheme: dark;
  --bg: #181a18;
  --side: #131513;
  --panel: #1f221f;
  --well: #171a16;
  --hover: #282c27;
  --line: #343933;
  --text: #f2f4eb;
  --mute: #a9b0a5;
  --faint: #858c82;
  --lime: #c6f359;
  --accent: #c6f359;
  --accent-wash: #303b22;
  --warn: #ffd19d;
  --shadow: 0 12px 40px #0003;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4ee;
  --side: #ebede6;
  --panel: #fffefa;
  --well: #f6f7f0;
  --hover: #e9ecdf;
  --line: #d6dace;
  --text: #20251c;
  --mute: #58624f;
  --faint: #64715e;
  --accent: #486218;
  --accent-wash: #e5efcc;
  --warn: #884500;
  --shadow: 0 12px 40px #35421712;
}
* {
  box-sizing: border-box;
}
html {
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled,
button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input,
textarea,
select {
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 88px;
}
button {
  background: none;
  border: none;
}
button svg,
i[data-icon] svg {
  flex: none;
}
svg.icon {
  width: 19px;
  height: 19px;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
i[data-icon] {
  display: inline-flex;
  font-style: normal;
}
label {
  display: grid;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 16px;
}
.hidden,
[hidden] {
  display: none !important;
}
.form-row,
.bar,
.header-row,
.row-actions,
.brand,
.kicker,
.btn,
.nav-item,
.top-actions,
.owner,
.stats,
.steps,
.control-line,
.switches,
.doc-row,
.status-chip,
.mode-picker,
.dialog-head,
.iconbtn,
.tagline,
.subtools {
  display: flex;
  align-items: center;
}
.skip {
  position: fixed;
  top: -100px;
  left: 8px;
  padding: 12px;
  background: var(--panel);
  z-index: 20;
}
.skip:focus {
  top: 8px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(34px, 4.2vw, 58px);
  letter-spacing: -0.065em;
  font-weight: 600;
  line-height: 1.05;
}
h2 {
  font-size: 23px;
  line-height: 1.22;
  letter-spacing: -0.045em;
  font-weight: 600;
}
h3 {
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.muted,
.empty p,
small {
  color: var(--mute);
}
small {
  font-size: 0.8rem;
}
p + p {
  margin-top: 9px;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 30px 16px 16px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  gap: 9px;
  white-space: nowrap;
  line-height: 1;
}
.brand b {
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.08em;
}
.sidebar > .brand {
  margin: 4px 11px 54px;
}
.nav-label,
.kicker,
.section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 600;
  color: var(--faint);
}
.nav-label {
  margin: 25px 12px 8px;
}
.nav-item {
  gap: 12px;
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--mute);
  font-size: 14px;
  font-weight: 500;
  margin: 2px 0;
}
.nav-item.active {
  color: var(--accent);
  background: var(--accent-wash);
}
.nav-item:hover {
  background: var(--hover);
  color: var(--text);
}
.sidebar-bottom {
  margin-top: auto;
}
.owner {
  border-top: 1px solid var(--line);
  padding: 18px 9px 0;
  margin-top: 12px;
  gap: 11px;
}
.owner b,
.owner small {
  display: block;
}
.avatar,
.round-initial {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 600;
}
.round-initial {
  width: 31px;
  height: 31px;
  font-size: 12px;
}
.main {
  min-width: 0;
}
.topbar {
  height: 69px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(20px, 4vw, 60px);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--mute);
}
.breadcrumb b {
  font-weight: 500;
  color: var(--text);
}
.breadcrumb svg.icon {
  width: 13px;
  height: 13px;
}
.top-actions {
  gap: 17px;
}
.iconbtn {
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  color: var(--mute);
}
.iconbtn:hover,
.btn.ghost:hover {
  background: var(--hover);
  color: var(--text);
}
.top-actions .iconbtn {
  border: 1px solid var(--line);
}
.mobile-menu {
  display: none;
}
.content {
  max-width: 1390px;
  margin: auto;
  padding: clamp(28px, 4vw, 55px) clamp(20px, 4vw, 60px) 65px;
}
.header-row {
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.kicker {
  gap: 7px;
  margin-bottom: 12px;
}
.live-dot {
  height: 7px;
  width: 7px;
  background: var(--accent);
  border-radius: 50%;
}
.btn {
  display: inline-flex;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}
.btn.lime {
  background: var(--lime);
  color: #18210f;
}
.btn.lime:hover {
  background: #d7ff80;
}
.btn.secondary {
  border: 1px solid var(--line);
  background: var(--panel);
}
.btn.secondary:hover {
  border-color: var(--faint);
}
.btn.ghost {
  color: var(--mute);
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn.danger {
  color: #f59382;
}
:root[data-theme="light"] .btn.danger {
  color: #a33623;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: clamp(16px, 2.4vw, 29px);
  min-width: 0;
}
.grid {
  display: grid;
  gap: 18px;
}
.studio-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(220px, 0.8fr);
}
.studio-create {
  border-top: 3px solid var(--lime);
  display: flex;
  flex-direction: column;
}
.studio-create h2 {
  margin-bottom: 20px;
}
.feature-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 10px;
  justify-content: flex-end;
  min-height: 268px;
  background: #272d20;
  color: #f5f8ee;
  border-color: #404638;
}
.feature-panel .kicker {
  color: #c6f359;
  margin: 0;
}
.feature-panel h2,
.feature-panel a,
.feature-panel .kicker {
  position: relative;
}
.feature-panel .btn {
  border-color: #5a6250;
  background: #30362a;
  color: #fff;
}
.signal {
  position: absolute;
  inset: 0 0 auto;
  height: 130px;
  overflow: hidden;
}
.signal svg {
  width: 100%;
  height: 100%;
  opacity: 0.85;
}
.mode-picker {
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.mode-picker button,
.switches button,
.steps button {
  color: var(--mute);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: 6px;
  min-height: 34px;
}
.mode-picker button[aria-pressed="true"],
.switches button.active,
.steps button.active {
  background: var(--accent-wash);
  color: var(--accent);
}
.mode-picker button:hover,
.steps button:hover,
.switches button:hover {
  background: var(--hover);
}
.entry-box {
  border: 1px solid var(--line);
  background: var(--well);
  border-radius: 8px;
  padding: 10px 11px;
}
.entry-box textarea {
  resize: vertical;
  min-height: 78px;
  border: 0;
  padding: 4px;
  background: transparent;
}
.entry-footer,
.bar,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.entry-footer {
  flex-wrap: wrap;
  margin-top: 10px;
}
.entry-footer select,
.bar select,
.control-line select {
  width: auto;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 34px 0 15px;
}
.section-heading h2 {
  font-size: 21px;
}
.list {
  padding: 0;
  overflow: hidden;
}
.doc-row {
  background: transparent;
  text-align: left;
  width: 100%;
  padding: 16px 20px;
  gap: 13px;
  min-height: 67px;
}
.doc-row + .doc-row,
.memory-row + .memory-row {
  border-top: 1px solid var(--line);
}
.doc-row:hover {
  background: var(--hover);
}
.doc-row > div {
  flex: 1;
  min-width: 0;
}
.doc-row strong,
.doc-row small {
  display: block;
}
.doc-row strong {
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.doc-icon,
.empty-icon {
  display: inline-grid;
  place-items: center;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 36px;
  height: 39px;
  color: var(--mute);
  flex: none;
}
.status-chip {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--mute);
  font-size: 11px;
  padding: 3px 9px;
  white-space: nowrap;
}
.empty {
  padding: 30px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}
.empty-icon {
  margin-bottom: 3px;
}
.empty p {
  font-size: 13px;
  max-width: 36em;
}
.editor-grid {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 30%);
}
.stack > * + * {
  margin-top: 15px;
}
.stack > label + label {
  margin-top: 0;
}
.steps {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.editor-paper {
  width: 100%;
  min-height: 340px;
  line-height: 1.75;
  font-size: 18px;
  padding: 18px;
  resize: vertical;
}
.row-actions,
.control-line,
.subtools,
.switches,
.stats {
  flex-wrap: wrap;
  gap: 8px;
}
.subtools {
  margin: 9px 0;
}
.stats {
  font-size: 12px;
  color: var(--mute);
  gap: 14px;
}
.pad-top {
  margin-top: 18px;
}
.row-actions {
  margin-top: 14px;
}
.right {
  margin-left: auto;
}
.choices {
  display: grid;
  gap: 8px;
}
.choice {
  text-align: left;
  padding: 12px 14px;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.choice.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 var(--accent);
}
.choice small,
.choice b {
  display: block;
}
.text-block {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.preview-text {
  max-height: 180px;
  overflow: auto;
}
.source {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}
.notice {
  border: 1px solid var(--line);
  background: var(--well);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
}
.notice.warn {
  color: var(--warn);
}
.notice.busy {
  color: var(--accent);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 14px;
}
.cards .panel {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 9px;
}
.cards .row-actions {
  margin-top: auto;
  padding-top: 10px;
}
.memory-row {
  padding: 17px 18px;
}
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.filters input {
  width: min(360px, 100%);
}
.filters select {
  max-width: 220px;
}
.switches {
  margin: 14px 0;
}
.hint {
  font-size: 13px;
  color: var(--mute);
  line-height: 1.55;
}
.mono {
  font-variant-numeric: tabular-nums;
}
.fit {
  width: fit-content;
}
.break {
  overflow-wrap: anywhere;
}
select {
  font-size: 13px;
}
.form-narrow {
  max-width: 820px;
}
summary {
  cursor: pointer;
  font-weight: 500;
}
details > summary + * {
  margin-top: 12px;
}
details + details {
  margin-top: 12px;
}
details p {
  font-size: 14px;
}
.tiny {
  font-size: 12px;
}
.btn-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 3px;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 14px;
  max-width: 90vw;
}
#toast:not(:empty) {
  padding: 10px 18px;
}
dialog {
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  width: min(540px, 94vw);
  max-height: 85dvh;
}
dialog::backdrop {
  background: #0009;
}
.dialog-head {
  margin-bottom: 18px;
}
.dialog-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}
.login-page {
  min-height: 100dvh;
  padding: 0 clamp(22px, 6vw, 92px);
  background: var(--side);
}
.login-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.login-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: stretch;
  max-width: 1450px;
  margin: auto;
  min-height: calc(100dvh - 106px);
  gap: 6vw;
  padding: clamp(24px, 6vh, 70px) 0;
}
.login-form {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  padding: 28px 0;
}
.login-form h1 {
  font-size: clamp(60px, 7vw, 114px);
  font-weight: 600;
  letter-spacing: -0.085em;
  line-height: 0.96;
}
.login-form h1 span {
  color: var(--accent);
}
.login-form .kicker {
  margin-bottom: 24px;
}
.login-form p {
  font-size: 16px;
  color: var(--mute);
  margin: 24px 0;
  max-width: 28em;
}
.login-action {
  padding: 14px 18px;
  gap: 25px;
}
.login-art {
  background: #242b1d;
  position: relative;
  align-self: stretch;
  border-radius: 13px;
  overflow: hidden;
  min-height: 370px;
  background-image:
    linear-gradient(115deg, #27321d00, #111a1088),
    repeating-linear-gradient(90deg, transparent 0 59px, #accc7012 59px 60px),
    repeating-linear-gradient(0deg, transparent 0 59px, #accc7012 59px 60px);
}
.art-crop {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
}
.art-letter {
  width: 112%;
  height: auto;
  transform: translateX(-4%);
  filter: drop-shadow(7px 11px 0 #0f190b);
}
.art-baseline {
  position: absolute;
  bottom: 20px;
  left: 24px;
  right: 24px;
  height: 10px;
  border-bottom: 1px solid #a6c4848a;
  background: repeating-linear-gradient(
    90deg,
    #a6c4848a 0 1px,
    transparent 1px 12px
  );
}
#auth-status {
  margin-top: 14px;
  color: var(--warn);
  max-width: 27em;
  font-size: 14px;
}
@media (min-width: 1650px) {
  .shell {
    grid-template-columns: 245px minmax(0, 1fr);
  }
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .content,
  .topbar {
    padding-left: 22px;
    padding-right: 22px;
  }
  .studio-grid,
  .editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-panel {
    min-height: 145px;
  }
  .signal {
    inset: 0 0 0 48%;
    height: 100%;
    opacity: 0.6;
  }
  .editor-paper {
    min-height: 300px;
  }
}
@media (max-width: 720px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 59px;
    bottom: 0;
    height: calc(100dvh - 59px);
    width: min(300px, 89vw);
    box-shadow: 10px 0 100vw 100vw #0007;
  }
  .sidebar.open {
    display: flex;
  }
  .sidebar > .brand {
    margin: 0 11px 20px;
  }
  .topbar {
    height: 59px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 6;
  }
  .top-actions {
    margin-left: auto;
  }
  .mobile-menu {
    display: flex;
    margin-right: 8px;
  }
  .topbar .breadcrumb span,
  .topbar .breadcrumb i {
    display: none;
  }
  .content {
    padding: 26px 15px 62px;
  }
  .header-row {
    margin-bottom: 22px;
  }
  .doc-row {
    padding: 13px;
  }
  .panel {
    border-radius: 10px;
  }
  .bar {
    flex-wrap: wrap;
  }
  .mode-picker {
    gap: 0;
  }
  .mode-picker button {
    font-size: 12px;
    padding: 7px 8px;
  }
  .login-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .login-header {
    padding: 19px 0;
  }
  .login-art {
    min-height: 195px;
    max-height: 250px;
    order: -1;
  }
  .art-letter {
    position: absolute;
    left: 20%;
    width: 67%;
    height: 110%;
    top: -4%;
  }
  .login-form {
    padding: 14px 0 30px;
  }
  .login-form h1 {
    font-size: clamp(55px, 14vw, 76px);
  }
  .login-form .kicker {
    margin-bottom: 12px;
  }
  .login-form p {
    margin: 16px 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .btn,
  .nav-item,
  .choice {
    transition:
      background 0.15s,
      border-color 0.15s;
  }
  .notice.busy {
    animation: pulse 1.7s ease-in-out infinite;
  }
  @keyframes pulse {
    50% {
      opacity: 0.65;
    }
  }
}
