:root {
  --ink: #111915;
  --green: #b8ef62;
  --paper: #f4f4ee;
  --line: #d8dcd5;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
.booting #auth,
.booting #workspace {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px Arial;
}
button,
input,
textarea,
select {
  font: inherit;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
  letter-spacing: 1px;
}
.brand img {
  width: 36px;
}
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 35px;
}
.auth-card,
.panel {
  width: min(440px, calc(100% - 30px));
  background: white;
  border: 1px solid var(--line);
  padding: 30px;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  flex: 1;
  padding: 12px;
  border: 0;
  background: none;
}
.tabs .active {
  border-bottom: 2px solid var(--ink);
}
form h1 {
  font-size: 30px;
}
form label {
  display: grid;
  gap: 7px;
  margin: 15px 0;
  font-size: 12px;
  font-weight: bold;
}
input,
textarea,
select {
  border: 1px solid #ccd2cb;
  background: #fff;
  padding: 12px;
  min-height: 44px;
  border-radius: 4px;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
form > button,
#newPage,
.editor-head button,
.panel button {
  border: 0;
  background: var(--ink);
  color: white;
  padding: 13px 17px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}
form > a {
  display: block;
  margin-top: 15px;
  color: #58655e;
}
#workspace {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px 1fr;
}
aside {
  background: #101815;
  color: white;
  padding: 25px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
aside nav {
  display: grid;
  gap: 5px;
  margin-top: 55px;
}
aside nav button,
aside > button {
  border: 0;
  background: transparent;
  color: #a7b2ac;
  text-align: left;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
}
aside nav .active {
  background: #b8ef62;
  color: #101815;
}
aside > button {
  margin-top: auto;
}
main {
  padding: 35px max(25px, 5%);
}
main > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 45px;
}
main header h1 {
  font-size: 38px;
  margin: 6px 0;
}
.project-list {
  display: grid;
  gap: 12px;
}
.project {
  background: white;
  border: 1px solid var(--line);
  padding: 20px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.7fr 0.9fr auto;
  align-items: center;
  gap: 15px;
}
.project small,
.status {
  color: #68736d;
}
.badge {
  width: max-content;
  padding: 6px 9px;
  border-radius: 99px;
  background: #e6e9e3;
  font-size: 10px;
}
.badge.published {
  background: #dff2c1;
}
.actions {
  display: flex;
  gap: 6px;
}
.actions button,
.actions a {
  border: 1px solid var(--line);
  background: white;
  padding: 8px;
  text-decoration: none;
  color: inherit;
  font-size: 11px;
}
.template-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.tpl {
  background: white;
  border: 1px solid var(--line);
  padding: 18px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tpl img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
}
.tpl button {
  border: 0;
  background: var(--ink);
  color: white;
  padding: 10px;
}
.editor {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 20px;
  height: calc(100vh - 100px);
}
#editForm {
  background: white;
  border: 1px solid var(--line);
  padding: 18px;
  overflow: auto;
}
.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: -18px;
  background: white;
  padding: 14px 0;
  z-index: 2;
}
.editor-head button {
  padding: 9px;
}
.editor-head #saveNow {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.color-label {
  border: 1px solid #ccd2cb;
  border-radius: 5px;
  padding: 12px;
  margin: 0 0 14px;
}
.color-label legend {
  padding: 0 5px;
  font-size: 12px;
  font-weight: 700;
}
.color-options,
.color-option,
.color-option > span {
  display: grid;
  gap: 7px;
}
.color-options {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.color-option {
  margin: 0;
  font-size: 11px;
}
.color-option > span {
  grid-template-columns: 44px 1fr;
  align-items: center;
}
.color-option input[type="color"] {
  width: 44px;
  height: 40px;
  min-height: 0;
  padding: 0;
  border: 1px solid #ccd2cb;
  cursor: pointer;
  overflow: hidden;
}
.color-option input.round-color {
  border-radius: 50%;
}
.color-option output {
  font: 13px monospace;
  text-transform: uppercase;
}
.upload-status {
  display: block;
  margin-top: 7px;
  color: #4f685e;
  font-size: 11px;
  font-weight: 600;
}
.social-editor {
  border: 1px solid #ccd2cb;
  border-radius: 5px;
  padding: 12px;
  margin: 0 0 14px;
}
.social-editor legend {
  padding: 0 5px;
  font-size: 12px;
  font-weight: 700;
}
.social-editor p {
  margin: 0 0 10px;
  color: #66736d;
  font-size: 11px;
}
.social-slot {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 7px;
  margin-top: 7px;
}
.social-slot select,
.social-slot input {
  margin: 0;
}
.publish-result {
  border: 1px solid #a9cc75;
  background: #f2fbe5;
  padding: 13px;
  margin-bottom: 15px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
}
.publish-result div {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.publish-result small {
  color: #4e6249;
  font-weight: bold;
}
.publish-result div a {
  color: #17443a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.publish-result button,
.publish-action {
  border: 1px solid #a9cc75;
  background: #fff;
  color: #17443a;
  padding: 9px;
  text-decoration: none;
  cursor: pointer;
  font-weight: bold;
}
.public-link {
  color: #17443a;
  font-weight: bold;
}
.preview {
  background: #dfe3dc;
  padding: 20px;
  overflow: hidden;
}
.preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}
.panel {
  margin: 0;
}
.panel textarea {
  min-height: 140px;
}
@media (max-width: 800px) {
  #workspace {
    grid-template-columns: 1fr;
  }
  .publish-result {
    grid-template-columns: 1fr 1fr;
  }
  .publish-result div {
    grid-column: 1 / -1;
  }
  aside {
    height: 64px;
    position: sticky;
    z-index: 5;
    padding: 10px 14px;
    flex-direction: row;
    align-items: center;
  }
  aside nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #101815;
    display: flex;
    justify-content: space-around;
    margin: 0;
    padding: 8px;
    z-index: 9;
  }
  aside nav button {
    font-size: 10px;
    padding: 9px 7px;
  }
  aside > button {
    margin: 0 0 0 auto;
  }
  main {
    padding: 25px 14px 85px;
  }
  .project {
    grid-template-columns: 1fr 1fr;
  }
  .project .actions {
    grid-column: 1/-1;
  }
  .template-list {
    grid-template-columns: 1fr 1fr;
  }
  .editor {
    display: block;
    height: auto;
  }
  .preview {
    height: 620px;
    margin-top: 15px;
  }
  main > header h1 {
    font-size: 30px;
  }
}
@media (max-width: 480px) {
  .template-list {
    grid-template-columns: 1fr;
  }
  .project {
    grid-template-columns: 1fr;
  }
  .project .actions {
    grid-column: auto;
    flex-wrap: wrap;
  }
  #newPage {
    font-size: 11px;
    padding: 10px;
  }
  .editor {
    margin-inline: -14px;
  }
  #editForm {
    border-inline: 0;
  }
  .preview {
    padding: 8px;
  }
}
.danger {
  background: #8f241f !important;
}
.request {
  display: grid;
  gap: 8px;
  padding: 18px 0;
  border-bottom: 1px solid #ddd;
}
.request a {
  color: #17443a;
}
.request select {
  width: max-content;
  padding: 8px;
}
