@font-face {
  font-family: Manrope;
  src: url('/fonts/manrope/manrope-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #f7f7f3;
  --paper: #fff;
  --linen: #f1f1eb;
  --line: #dfdfd7;
  --ink: #232826;
  --muted: #575f59;
  --blue: #234dcd;
  --blue-hover: #1d40af;
  --blue-soft: #e9eefc;
  --navy: #1c2c52;
  --danger: #a72c3a;
  --radius: 13px;
  --heading: Manrope, system-ui, sans-serif;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--canvas);
  accent-color: var(--blue);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 290px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--heading); }
h1 { font-size: clamp(2.15rem, 5vw, 3.13rem); font-weight: 760; letter-spacing: -.038em; line-height: 1.1; text-wrap: balance; }
h2 { font-size: 1.48rem; letter-spacing: -.025em; line-height: 1.2; }
h3 { font-size: .92rem; font-weight: 760; }
p { line-height: 1.55; text-wrap: pretty; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .63; cursor: wait; }
a { color: inherit; text-decoration-color: #788ac7; text-underline-offset: .2em; }
a[href] { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
::selection { background: #cfdafe; color: #142552; }
.glyph, .app-icon { flex: none; display: inline-block; vertical-align: middle; }
.app-icon { object-fit: contain; }
.glyph { width: 18px; height: 18px; }
.muted, .muted-text { color: var(--muted); }
.glyph.muted { opacity: .52; }

.layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: var(--linen); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; padding: 27px 15px 15px; gap: 39px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font: 800 1.15rem/1 var(--heading); letter-spacing: -.029em; white-space: nowrap; }
.sidebar .brand { margin-left: 8px; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; grid-template: 1fr 1fr / 1fr 1fr;
  place-items: center; gap: 2px; padding: 7px; border-radius: 10px; background: var(--blue); color: #fff; font-size: .72rem; }
.brand-mark i { display: block; background: #fff; width: 8px; height: 8px; border-radius: 50%; }
.brand-mark i:nth-child(2) { border-radius: 2px 4px 4px 4px; background: #c7d6ff; }
.brand-mark i:nth-child(3) { border-radius: 4px 4px 2px 4px; background: #c7d6ff; }
.sidebar nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; text-decoration: none; font-weight: 590;
  color: #414743; border-radius: 9px; white-space: nowrap; }
.nav-item:hover { background: #e9e9e0; }
.nav-item.current { background: var(--blue-soft); color: #183ba7; font-weight: 720; }
.nav-item.current .glyph { filter: invert(20%) sepia(78%) saturate(2709%) hue-rotate(222deg); }
.sidebar-user { margin-top: auto; display: flex; gap: 7px; padding: 15px 1px 0; align-items: center; border-top: 1px solid var(--line); }
.account-link { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; text-decoration: none; }
.avatar { display: inline-grid; place-items: center; height: 36px; width: 36px; flex: none; border-radius: 50%;
  background: #e2e8f9; color: #2347a1; font: 800 .93rem/1 var(--heading); text-decoration: none; }
.account-name, .row-main { min-width: 0; display: grid; gap: 4px; }
.account-name strong, .account-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-name strong { font-size: .88rem; }
small { color: var(--muted); font-size: .79rem; line-height: 1.4; }
.workspace { min-width: 0; }
.topbar { min-height: 67px; padding: 12px 34px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.topbar-title { display: flex; align-items: center; gap: 9px; font-size: .83rem; min-width: 0; }
.topbar .glyph { width: 16px; height: 16px; }
.topbar strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-account { display: none; }
.main-content { width: min(100%, 1304px); margin: 0 auto; padding: 45px 40px 60px; outline: none; }
.heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 31px; }
.heading p { color: var(--muted); margin-top: 10px; max-width: 66ch; white-space: pre-line; }
.heading h1 { overflow-wrap: anywhere; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px; margin: 4px 0 0; flex-shrink: 0; }
.button { min-height: 41px; display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  padding: 9px 13px; white-space: nowrap; border-radius: 8px; border: 1px solid transparent; text-decoration: none; font-size: .88rem; font-weight: 670; }
.button:hover { text-decoration: none; }
.button .glyph { width: 16px; height: 16px; }
.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.primary .glyph { filter: invert(1); }
.secondary { background: var(--paper); border-color: #d7d9d1; color: var(--ink); }
.secondary:hover { background: #f5f6f0; border-color: #bdc0b7; }
.button.small { padding: 6px 9px; min-height: 32px; font-size: .78rem; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; background: transparent;
  color: var(--ink); border: 1px solid transparent; border-radius: 7px; text-decoration: none; }
.icon-button:hover { background: var(--linen); border-color: var(--line); }
.icon-button .glyph { height: 17px; width: 17px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.text-link, .back-link { color: #2444a6; display: inline-flex; align-items: center; gap: 6px; font-weight: 660; font-size: .86rem; text-decoration: none; }
.text-link:hover, .back-link:hover { text-decoration: underline; }
.text-link .glyph, .back-link .glyph { width: 15px; height: 15px; }
.back-link { margin-bottom: 18px; }
.list-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.tabs { display: flex; flex-shrink: 0; gap: 5px; align-items: center; }
.tabs button { border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted);
  min-height: 38px; padding: 7px 12px; font-size: .87rem; font-weight: 650; }
.tabs button[aria-pressed="true"] { color: var(--ink); background: var(--paper); border-color: var(--line); }
.tabs button:hover { background: var(--linen); }
.search { min-width: 0; max-width: min(45%, 280px); display: flex; flex-direction: row; align-items: center;
  padding-inline: 9px; gap: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.search:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.search .glyph { width: 15px; height: 15px; opacity: .6; }
.search input { border: 0; min-width: 0; min-height: 37px; background: transparent; font-size: .85rem; padding: 4px; }
.search input:focus-visible { outline: none; }
.empty { min-height: 165px; background: var(--paper); display: flex; align-items: center; gap: 18px;
  padding: 30px; border: 1px dashed #c9cfc8; border-radius: var(--radius); }
.empty .button { margin-left: auto; }
.empty-icon, .project-icon, .file-glyph { display: grid; place-items: center; flex: none; background: var(--blue-soft);
  color: var(--blue); border-radius: 10px; height: 48px; width: 48px; }
.empty-icon .glyph { filter: invert(25%) sepia(62%) saturate(2151%) hue-rotate(218deg); width: 25px; height: 25px; }
.empty h2 { font-size: 1.24rem; }
.empty p { color: var(--muted); margin-top: 5px; font-size: .89rem; }
.project-list, .file-list, .team-list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.project-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 70px 105px auto 20px; gap: 13px; align-items: center;
  min-height: 72px; padding: 12px 16px; text-decoration: none; }
.project-row + .project-row, .file-row, .team-row + .team-row, .connection-row + .connection-row { border-top: 1px solid var(--line); }
.project-row:hover, .directory-row:hover { background: #f9faf6; }
.project-row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.project-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.project-row:only-child { border-radius: var(--radius); }
.project-icon { width: 37px; height: 37px; }
.row-main strong, .row-main small, .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-count, .row-date { color: var(--muted); font-size: .83rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.role { display: inline-flex; align-items: center; gap: 5px; width: fit-content; white-space: nowrap; padding: 4px 8px;
  border-radius: 20px; font-weight: 620; background: #eceee7; color: #425047; font-size: .75rem; }
.role .glyph { width: 12px; height: 12px; }
.row-arrow { opacity: .7; }
.dashboard-apps { margin-top: 39px; }
.app-shelf { margin-top: 17px; }
.app-shelf h3 { margin-bottom: 9px; color: #4e5752; }
.app-launchers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.app-launcher { display: flex; align-items: center; min-width: 0; gap: 6px; padding: 9px 8px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--paper); text-decoration: none; font-size: .84rem; font-weight: 690; white-space: nowrap; }
.app-launcher:hover { border-color: #9daede; background: #f5f7ff; }
.app-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.directory-row { display: flex; align-items: center; gap: 11px; min-width: 0; text-decoration: none; padding: 10px 12px;
  border: 1px solid var(--line); background: var(--paper); border-radius: 10px; }
.directory-row .row-main { flex: 1; }
.library .app-shelf + .app-shelf { margin-top: 28px; }
.project-status { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .83rem; margin: -12px 0 26px; }
.file-row, .file-table-head { display: grid; grid-template-columns: minmax(0, 1fr) 76px 112px 82px; gap: 10px;
  align-items: center; min-height: 62px; padding: 10px 15px; }
.file-table-head { min-height: 41px; font-size: .76rem; color: var(--muted); font-weight: 690; }
.file-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.file-name { display: block; text-decoration: none; font-weight: 710; }
.file-name:hover { color: var(--blue); text-decoration: underline; }
.file-actions { display: flex; justify-content: flex-end; gap: 1px; }
.file-glyph { width: 33px; height: 33px; background: var(--linen); }
.team-row { display: grid; grid-template-columns: 36px minmax(95px, 1fr) auto minmax(90px, 1fr) auto; gap: 11px; align-items: center; padding: 13px 14px; }
.table-apps { color: var(--muted); font-size: .8rem; }
.team-app-icons { display: flex; flex-wrap: wrap; gap: 1px; }
.team-app-count { display: none; }
.account-section p { margin: 10px 0 19px; color: var(--muted); }
.endpoint-label { width: min(100%, 570px); margin-bottom: 25px; }
.endpoint, .connection-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; }
.endpoint { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.endpoint code { overflow-wrap: anywhere; }
.connection-row { padding: 12px 15px; }
label { display: flex; flex-direction: column; gap: 7px; font-size: .85rem; font-weight: 680; }
input, select, textarea { width: 100%; min-height: 41px; background: var(--paper); border: 1px solid #caccbf;
  border-radius: 7px; padding: 8px 10px; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #5e665f; }
textarea { resize: vertical; }
input[type="file"] { padding: 8px; }
input[type="file"]::file-selector-button { cursor: pointer; border: 0; background: var(--blue-soft); color: #183ba7; border-radius: 4px; padding: 5px 8px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { margin-bottom: 8px; font-size: .87rem; font-weight: 690; }
dialog { border: 0; background: var(--paper); color: var(--ink); border-radius: 15px; box-shadow: 0 16px 46px #18201835;
  width: min(550px, calc(100% - 24px)); max-height: calc(100dvh - 28px); padding: 22px; }
dialog::backdrop { background: #111f3b71; }
dialog form, .auth-content form { display: grid; gap: 14px; }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.dialog-head p { margin-top: 5px; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.close-dialog { flex: none; font-size: 1.25rem; margin: -6px -6px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.optional, .field-help, .form-error { font-size: .82rem; color: var(--muted); font-weight: 480; }
.form-error { color: var(--danger); overflow-wrap: anywhere; }
.form-error:empty { display: none; }
.form-pair { display: grid; gap: 10px; grid-template-columns: 1fr 125px; }
.members, .versions { display: grid; gap: 7px; }
.member, .version-row { display: flex; gap: 9px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; }
.member .row-main, .version-row .row-main { flex: 1; }
.app-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.check { display: flex; flex-direction: row; gap: 4px; align-items: center; padding: 5px; border: 1px solid var(--line); border-radius: 6px; }
.check input { width: 16px; height: 16px; min-height: 0; }
.window-choice .check { width: fit-content; min-height: 36px; gap: 8px; padding: 4px 0; border: 0; cursor: pointer; }
.window-choice .check input { margin: 0; }
@media (pointer: coarse) { .window-choice .check { min-height: 44px; } }
.editor-picker, .action-list { display: grid; gap: 7px; }
.action-list .button { justify-content: flex-start; white-space: normal; }
#toast { position: fixed; z-index: 2; right: 20px; bottom: 20px; max-width: min(470px, calc(100% - 40px));
  border-radius: 9px; background: var(--navy); color: #fff; font-size: .88rem; line-height: 1.45; box-shadow: 0 8px 24px #18201826; padding: 11px 14px;
  opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .16s, transform .2s cubic-bezier(.16, 1, .3, 1); }
#toast[data-error="true"] { background: #8b2530; }
#toast[data-visible="true"] { opacity: 1; transform: none; }

.auth-layout { display: grid; grid-template-columns: minmax(360px, .92fr) minmax(0, 1.08fr); min-height: 100dvh; }
.auth-main { min-width: 0; padding: 32px clamp(24px, 5vw, 75px); display: grid; grid-template-rows: auto 1fr; }
.auth-main .brand { justify-self: start; }
.auth-content { width: min(100%, 397px); margin-inline: auto; align-self: center; padding: 52px 0 74px; }
.auth-content h1 { text-wrap: initial; }
.auth-content > p { color: var(--muted); margin-top: 7px; }
.auth-content form { margin-top: 22px; }
.auth-content input { min-height: 48px; }
.auth-submit { justify-content: space-between; min-height: 46px; margin-top: 4px; }
.auth-content .back-link { margin: 18px 0 0; }
.auth-art { min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px;
  background: #1b2b50; margin: 12px 12px 12px 0; border-radius: 16px; color: #e4ebff; padding: 27px; }
.auth-art p { font: 640 clamp(1rem, 2vw, 1.24rem)/1.5 var(--heading); }
.art-grid { width: min(100%, 460px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.art-tile { display: grid; place-items: center; aspect-ratio: 1; background: #24365c; border: 1px solid #405277; border-radius: 14px; }
.art-tile img { width: min(76%, 72px); height: auto; }
.consent-page { min-height: 100dvh; display: grid; align-items: center; justify-items: center; padding: 16px; }
.consent-card { background: var(--paper); border: 1px solid var(--line); width: min(100%, 530px); padding: 28px; border-radius: 15px; }
.consent-card h1 { font-size: 2rem; margin: 28px 0 12px; }
.consent-card ul { line-height: 1.55; margin: 12px 0; padding-left: 1.5em; }
.consent-card form { display: flex; justify-content: flex-end; gap: 7px; margin-top: 25px; }
.startup-error { width: min(100%, 560px); padding: 26px; margin: 10vh auto; }
.startup-error p { margin: 10px 0 18px; }

.editor-page { --file-menu-inset: 29vw; --file-menu-height: 28px; min-width: 0; height: 100dvh; overflow: hidden; }
.editor-menu.button { position: fixed; inset: 3px var(--file-menu-inset) auto auto; z-index: 1;
  min-height: var(--file-menu-height); padding: 2px 8px; gap: 4px; border-radius: 6px; }
.editor-page:has(.editor-panel:popover-open) .editor-menu { background: var(--linen); }
.editor-panel { position: fixed; inset: calc(var(--file-menu-height) + 7px) var(--file-menu-inset) auto auto;
  margin: 0; width: 254px; max-width: calc(100% - 2 * var(--file-menu-inset));
  max-height: calc(100dvh - var(--file-menu-height) - 16px); overflow: auto;
  padding: 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink); overflow-wrap: anywhere; }
.editor-panel h1 { font-size: .93rem; line-height: 1.35; letter-spacing: normal; text-wrap: wrap; }
.editor-status { margin-top: 4px; color: var(--muted); font-size: .8rem; }
.editor-feedback { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.editor-status[data-error="true"], .editor-feedback[data-error="true"] { color: var(--danger); }
.editor-page:not(:has(.editor-panel:popover-open)) .editor-feedback[data-error="true"] {
  inset: calc(var(--file-menu-height) + 7px) var(--file-menu-inset) auto auto; z-index: 1; width: fit-content; height: auto;
  max-width: min(360px, calc(100% - 2 * var(--file-menu-inset))); clip-path: none;
  padding: 8px 10px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; font-size: .8rem; overflow-wrap: anywhere; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.editor-actions [hidden] { display: none; }
#workbench { display: block; width: 100%; height: 100%; border: 0; background: #242625; }
#save-note { max-width: 52ch; }
@media (max-width: 1180px), (pointer: coarse) {
  .editor-page { --file-menu-inset: 12px; }
  .editor-menu.button { inset-block: auto 38px; }
  .editor-panel, .editor-page:not(:has(.editor-panel:popover-open)) .editor-feedback[data-error="true"] {
    inset-block: auto calc(var(--file-menu-height) + 42px); }
  .editor-panel { max-height: calc(100dvh - var(--file-menu-height) - 54px); }
}
@media (pointer: coarse) {
  .editor-page { --file-menu-height: 44px; }
}
@media (max-width: 1120px) {
  .app-launchers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main-content { padding-inline: 28px; }
  .heading-actions { max-width: 51%; }
}
@media (max-width: 800px) {
  .layout { display: block; }
  .sidebar { height: auto; position: static; padding: 12px 16px 8px; border-right: 0; border-bottom: 1px solid var(--line); gap: 11px; }
  .sidebar .brand { margin-left: 0; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 3px; }
  .nav-item { padding: 8px 9px; gap: 7px; font-size: .86rem; }
  .nav-item .glyph { width: 15px; height: 15px; }
  .sidebar-user { display: none; }
  .topbar { padding: 6px 16px; min-height: 44px; }
  .mobile-account { display: none; }
  .main-content { padding: 25px 16px 42px; }
  .heading { flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
  .heading-actions { margin: 0; max-width: 100%; justify-content: flex-start; }
  .project-status { margin: -5px 0 15px; }
  .empty { min-height: 136px; padding: 17px; gap: 10px; flex-wrap: wrap; }
  .empty .button { margin-left: 58px; }
  .project-row { grid-template-columns: 34px minmax(0, 1fr) auto 16px; padding: 9px; gap: 8px; }
  .project-row .row-count, .project-row .row-date { display: none; }
}
@media (max-width: 620px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-main { min-height: 70dvh; padding: 20px; }
  .auth-content { padding: 42px 0; }
  .auth-art { margin: 0 10px 10px; padding: 14px; gap: 10px; }
  .art-grid { max-width: 290px; grid-template-columns: repeat(8, 1fr); gap: 3px; }
  .art-tile { border: 0; border-radius: 7px; }
  .auth-art p { font-size: .87rem; }
  .app-launchers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-directory { grid-template-columns: 1fr; }
  .file-row, .file-table-head { grid-template-columns: minmax(0, 1fr) 73px; padding-inline: 9px; gap: 5px; }
  .file-row .row-date, .file-row .row-count, .file-table-head span:nth-child(2), .file-table-head span:nth-child(3) { display: none; }
  .team-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; padding: 9px; }
  .team-row .table-apps { grid-column: 2; }
  .team-app-count { display: inline; }
  .team-app-icons { display: none; }
  .team-row .button { grid-column: 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .001ms !important; }
}
