:root {
  --cat-rosewater: #f5e0dc;
  --cat-flamingo: #f2cdcd;
  --cat-pink: #f5c2e7;
  --cat-mauve: #cba6f7;
  --cat-red: #f38ba8;
  --cat-maroon: #eba0ac;
  --cat-peach: #fab387;
  --cat-yellow: #f9e2af;
  --cat-green: #a6e3a1;
  --cat-teal: #94e2d5;
  --cat-sky: #89dceb;
  --cat-sapphire: #74c7ec;
  --cat-blue: #89b4fa;
  --cat-lavender: #b4befe;
  --cat-text: #cdd6f4;
  --cat-subtext1: #bac2de;
  --cat-subtext0: #a6adc8;
  --cat-overlay2: #9399b8;
  --cat-overlay1: #7f849c;
  --cat-overlay0: #6c7086;
  --cat-surface2: #585b70;
  --cat-surface1: #45475a;
  --cat-surface0: #313244;
  --cat-base: #1e1e2e;
  --cat-mantle: #181825;
  --cat-crust: #11111b;

  --cat-latte-base: #eff1f5;
  --cat-latte-mantle: #e6e9ef;
  --cat-latte-crust: #dce0e8;

  --cat-latte-surface0: #ccd0da;
  --cat-latte-surface1: #bcc0cc;
  --cat-latte-surface2: #acb0be;
  --cat-latte-overlay0: #9ca0b0;
  --cat-latte-overlay1: #8c8fa1;
  --cat-latte-overlay2: #7c7f93;

  --cat-latte-text: #4c4f69;
  --cat-latte-subtext: #5c5f77;

  --cat-latte-mauve: #8839ef;
}

@font-face {
  font-family: 'iAWriterDuoS-Regular';
  src: url('fonts/iAWriterDuoS-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'iAWriterDuoS-Bold';
  src: url('fonts/iAWriterDuoS-Bold.woff2') format('woff2');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background-color: var(--cat-base);
  color: var(--cat-text);
  margin: 0;
  padding: 0;
  font-family: 'iAWriterDuoS-Regular', 'Courier New', Courier, monospace;
}

body {
  display: flex;
  flex-direction: column;
  min-width: 100vw;
  min-height: 100vh;
}

header {
  min-height: 10vh;
}

main {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 5vw;
}

footer {
  color: var(--color-text);
  font-size: 1rem;
  inset: auto 0px 0px;
  padding: 1rem 1.5rem;
  text-align: center;
  width: 100%;
  font-family: sans-serif;
  background-color: var(--color-background);
}

a {
  color: var(--cat-sky);
}

a:hover {
  color: var(--cat-rosewater);
}


/*
  The editor
  */

#window {
  border: 1px solid var(--cat-latte-overlay0);
  display: flex;
  flex-direction: column;
  height: 50vh;
  max-height: 50vh;

  color: var(--cat-latte-text);
  border-radius: 10px;
  overflow: hidden;

  font-size: 12px;
  line-height: 20px;
}

#titlebar {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 3vh;
  background: var(--cat-latte-surface1);
  border-bottom: 1px solid var(--cat-latte-overlay0);
}

.file-icon {}

.title {}



#main-window {
  flex: 1;
  display: flex;
  flex-direction: row;
  max-height: 47vh;
}

#sidebar {
  width: 30ch;
  background: var(--cat-latte-mantle);
  border-right: 1px solid var(--cat-latte-surface0);
}

#editor {
  width: 60ch;
  max-width: 60ch;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 10px;

  font-family: 'iAWriterDuoS-Regular', 'Courier New', Courier, monospace;
  word-wrap: break-word;
  overflow-wrap: break-word;
  background: var(--cat-latte-base);

  caret-color: var(--cat-latte-mauve);
}

#editor::-webkit-scrollbar {
  width: 8px;
}

#editor::-webkit-scrollbar-track {
  background: var(--cat-latte-surface0);
  border-left: 1px solid var(--cat-latte-surface1);
}

#editor::-webkit-scrollbar-thumb {
  background: var(--cat-latte-overlay2);
  border-radius: 5px;
}

[contenteditable] {
  display: inline;
  overflow: hidden;
  text-overflow: inherit;
  -webkit-user-select: auto;
  user-select: auto;
  -moz-user-select: -moz-text;
  max-height: 47vh;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  outline: none;
}

.file {
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: var(--cat-latte-crust);
  border-bottom: 1px solid var(--cat-latte-surface0);
  cursor: pointer;
}

.file:hover {
  background: var(--cat-latte-surface0);
  border-bottom: 1px solid var(--cat-latte-surface1);
}

.metadata {
  display: flex;
  flex-direction: row;
  color: var(--cat-latte-surface2);
}

.date {
  flex: 1;
  padding: 0 0;
}

.active .status {
  background: var(--cat-mauve);
  color: var(--cat-latte-text);
  border-radius: 5px;
  padding: 0 4px;
}

#sidebar a {
  color: inherit;
  text-decoration: none;
}

#sidebar a:hover {
  color: inherit;
  text-decoration: none;
}
