@layer theme, base, components, utilities;

@layer base {
  /* Keep the SSR shell recognizable before the route stylesheet is parsed. */
  html,
  body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
  }
  body {
    overflow: hidden;
  }
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  button,
  input,
  textarea,
  select {
    font: inherit;
  }
  .sveltekit-body {
    display: contents;
  }
  .app {
    display: grid;
    grid-template-columns: 258px minmax(0, 1fr);
    height: 100dvh;
  }
  .app.sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
  }
  .sidebar {
    grid-column: 1;
    grid-row: 1 / -1;
    min-height: 0;
  }
  .workspace {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
  }
  .editor-shell {
    display: grid;
    flex: 1;
    min-width: 0;
    min-height: 0;
    grid-template-columns: minmax(0, 50%) 1px minmax(0, 1fr);
  }
  .source-pane,
  .rendered-pane {
    min-width: 0;
    min-height: 0;
  }
  .source-pane {
    grid-column: 1;
    grid-row: 1;
  }
  .rendered-pane {
    grid-column: 3;
    grid-row: 1;
  }

  #startup-shell {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: grid;
    grid-template-columns: 258px minmax(0, 1fr);
    background: #141413;
    color: #e9e6df;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }
  :root[data-theme="light"] #startup-shell {
    background: #fafafa;
    color: #262623;
  }
  .startup-sidebar {
    min-height: 0;
    padding: 16px 12px;
    border-right: 1px solid #383630;
    background: #171716;
  }
  :root[data-theme="light"] .startup-sidebar {
    border-color: #eaeaea;
    background: #fafafa;
  }
  .startup-heading,
  .startup-switcher,
  .startup-toolbar {
    display: flex;
    align-items: center;
  }
  .startup-heading {
    gap: 10px;
    margin: 0 4px 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
  }
  .startup-add {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #434139;
    border-radius: 7px;
    font-family: sans-serif;
    font-size: 23px;
    line-height: 1;
  }
  .startup-chevron {
    margin-left: auto;
    color: #9c978d;
    font-family: sans-serif;
    font-size: 18px;
  }
  .startup-switcher {
    justify-content: space-around;
    height: 42px;
    margin: 0 4px 18px;
    border: 1px solid #383630;
    border-radius: 10px;
    color: #c6c1b8;
    font-size: 13px;
  }
  :root[data-theme="light"] .startup-switcher {
    border-color: #dedcd5;
    color: #55524c;
  }
  .startup-toolbar {
    justify-content: space-between;
    margin: 0 4px 8px;
    color: #9c978d;
    font-size: 12px;
    text-transform: uppercase;
  }
  .startup-search {
    height: 36px;
    margin: 0 0 16px;
    border: 1px solid #434139;
    border-radius: 8px;
  }
  :root[data-theme="light"] .startup-search {
    border-color: #d8d5cc;
  }
  .startup-message {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-top: 8px;
    color: #9c978d;
    font-size: 13px;
    text-align: center;
  }
  .startup-message strong {
    color: inherit;
    font-size: 14px;
  }
  .startup-ring {
    width: 22px;
    height: 22px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
  }
  .startup-workspace {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
  }
  .startup-editor {
    display: grid;
    flex: 1;
    min-width: 0;
    min-height: 0;
    grid-template-columns: minmax(0, 50%) 1px minmax(0, 1fr);
  }
  .startup-pane {
    min-width: 0;
    min-height: 0;
    padding: 90px 76px;
  }
  .startup-divider {
    grid-column: 2;
    background: #383630;
  }
  :root[data-theme="light"] .startup-divider {
    background: #dedcd5;
  }
  .startup-bar {
    height: 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    background: #2a2a26;
  }
  :root[data-theme="light"] .startup-bar {
    background: #eeece6;
  }
  .startup-bar.heading {
    width: 46%;
    height: 28px;
    margin-bottom: 34px;
  }
  .startup-bar.long {
    width: 82%;
  }
  .startup-bar.medium {
    width: 66%;
  }
  .startup-bar.short {
    width: 31%;
  }
  @media (max-width: 900px) {
    #startup-shell {
      grid-template-columns: minmax(0, 1fr);
    }
    .startup-sidebar {
      display: none;
    }
    .startup-editor {
      grid-template-columns: minmax(0, 1fr);
    }
    .startup-divider,
    .startup-pane:last-child {
      display: none;
    }
  }
}
