:root {
  color-scheme: light;
  --ink: #171716;
  --muted: #6e6b63;
  --line: #d9d5cb;
  --line-dark: #bbb5a8;
  --paper: #f4f1eb;
  --panel: #fbfaf7;
  --white: #ffffff;
  --gold: #987744;
  --gold-soft: #ebe2d2;
  --success: #58715c;
  --danger: #9a4e42;
  --shadow: 0 18px 55px rgba(42, 38, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  align-items: center;
  background: var(--ink);
  color: var(--white);
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr auto 1fr;
  min-height: 76px;
  padding: 14px 28px;
  position: relative;
  z-index: 10;
}

.brand {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 12px;
  justify-self: start;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  border: 1px solid #6e6a61;
  display: inline-flex;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 24px;
}

.brand small {
  color: #aaa69d;
  font-size: 8px;
  letter-spacing: 1.8px;
  line-height: 13px;
  text-transform: uppercase;
}

.header-status {
  align-items: center;
  color: #aaa69d;
  display: flex;
  font-size: 11px;
  gap: 8px;
}

.save-dot {
  background: var(--success);
  border-radius: 50%;
  height: 6px;
  transition: background 160ms ease;
  width: 6px;
}

.save-dot.is-saving {
  background: var(--gold);
}

.header-actions {
  display: flex;
  gap: 9px;
  justify-self: end;
}

.button {
  border: 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  min-height: 40px;
  padding: 0 18px;
  text-transform: uppercase;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button-primary {
  background: #f1eee7;
  color: var(--ink);
}

.button-primary:hover {
  background: var(--white);
}

.button-quiet {
  background: transparent;
  border: 1px solid #56534d;
  color: #d8d5ce;
}

.button-quiet:hover {
  border-color: #8a867e;
  color: var(--white);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(420px, 510px) minmax(580px, 1fr);
  height: calc(100vh - 76px);
  overflow: hidden;
}

.editor {
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  scrollbar-color: #c7c1b7 transparent;
}

.editor-intro {
  padding: 34px 36px 27px;
}

.eyebrow {
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.1px;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.project-title {
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  line-height: 36px;
  outline: none;
  padding: 0 0 3px;
  width: 100%;
}

.project-title:focus {
  border-color: var(--line-dark);
}

.editor-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 19px;
  margin: 8px 0 0;
}

.tabs {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #77736b;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.7px;
  padding: 17px 4px 14px;
  text-transform: uppercase;
}

.tab:hover,
.tab.is-active {
  color: var(--ink);
}

.tab.is-active {
  border-bottom-color: var(--gold);
}

.tab-panel {
  display: none;
  padding: 28px 36px 80px;
}

.tab-panel.is-active {
  display: block;
}

fieldset {
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 30px;
  padding: 0 0 15px;
}

fieldset:last-child {
  border-bottom: 0;
}

legend {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 27px;
  margin-bottom: 20px;
  padding: 0;
}

.field {
  margin: 0 0 18px;
  position: relative;
  width: 100%;
}

.field-row,
.field-grid {
  display: grid;
  gap: 14px;
}

.field-row {
  grid-template-columns: 1fr 0.65fr;
}

.field-grid {
  grid-template-columns: repeat(3, 1fr);
}

.field label {
  color: #555249;
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.25px;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.field input,
.field textarea {
  background: var(--white);
  border: 1px solid #d7d2c8;
  border-radius: 0;
  color: var(--ink);
  line-height: 21px;
  outline: 0;
  padding: 10px 11px;
  resize: vertical;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  width: 100%;
}

.field textarea {
  min-height: 64px;
}

.field input:focus,
.field textarea:focus {
  border-color: #a78c61;
  box-shadow: 0 0 0 2px rgba(152, 119, 68, 0.12);
}

.field-help,
.field-meta {
  color: #918d84;
  display: block;
  font-size: 10px;
  line-height: 15px;
  margin-top: 6px;
}

.field-meta {
  text-align: right;
}

.panel-callout {
  background: var(--gold-soft);
  margin: 0 0 24px;
  padding: 17px 18px;
}

.panel-callout strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 5px;
}

.panel-callout p {
  color: #655a48;
  font-size: 11px;
  line-height: 17px;
  margin: 0;
}

.photo-card {
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  padding-bottom: 26px;
}

.photo-card:last-child {
  border-bottom: 0;
}

.photo-card-header {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.photo-card-header strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
}

.photo-card-header span {
  color: #8b877e;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.photo-drop {
  background-color: #e8e5de;
  background-position: center;
  background-size: cover;
  border: 1px solid var(--line);
  display: grid;
  min-height: 168px;
  overflow: hidden;
  place-items: center;
  position: relative;
}

.photo-drop::after {
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.6));
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.photo-drop input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.photo-upload {
  align-items: center;
  align-self: end;
  color: var(--white);
  cursor: pointer;
  display: flex;
  font-size: 9px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  letter-spacing: 1.4px;
  padding: 18px;
  position: relative;
  text-transform: uppercase;
  width: 100%;
  z-index: 1;
}

.photo-fields {
  margin-top: 14px;
}

.photo-fields .field:last-child {
  margin-bottom: 0;
}

.photo-publish-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
}

.photo-status {
  color: #7b776e;
  font-size: 10px;
  line-height: 15px;
}

.photo-status.is-public {
  color: var(--success);
}

.photo-status.is-uploading {
  color: var(--gold);
}

.button-publish {
  background: transparent;
  border: 1px solid var(--line-dark);
  color: var(--ink);
  min-height: 34px;
  padding: 0 12px;
}

.button-publish:hover {
  background: var(--ink);
  color: var(--white);
}

.button-publish:disabled {
  cursor: wait;
  opacity: 0.55;
}

.module-card {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.module-card:first-child {
  padding-top: 0;
}

.module-heading {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.module-heading strong,
.module-heading span {
  display: block;
}

.module-heading strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 400;
  line-height: 25px;
}

.module-heading span {
  color: #817d74;
  font-size: 10px;
  line-height: 16px;
  margin-top: 2px;
}

.switch {
  cursor: pointer;
  flex: 0 0 auto;
  height: 24px;
  position: relative;
  width: 42px;
}

.switch input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.switch span {
  background: #c9c5bd;
  border-radius: 24px;
  inset: 0;
  position: absolute;
  transition: background 150ms ease;
}

.switch span::after {
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  content: "";
  height: 18px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 150ms ease;
  width: 18px;
}

.switch input:checked + span {
  background: var(--ink);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.switch input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.module-fields {
  display: none;
  padding-top: 22px;
}

.module-fields.is-enabled {
  display: block;
}

.preview-area {
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.6), transparent 34%),
    #e5e1d9;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
}

.preview-toolbar {
  align-items: center;
  border-bottom: 1px solid rgba(103, 96, 83, 0.17);
  display: flex;
  justify-content: space-between;
  padding: 20px 30px 17px;
}

.preview-toolbar .eyebrow {
  margin-bottom: 4px;
}

.preview-toolbar strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
}

.viewport-toggle {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(103, 96, 83, 0.18);
  display: flex;
  padding: 3px;
}

.viewport-toggle button {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  height: 31px;
  justify-content: center;
  width: 38px;
}

.viewport-toggle button.is-active {
  background: var(--white);
  box-shadow: 0 2px 9px rgba(33, 30, 25, 0.09);
}

.viewport-toggle svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.5;
  width: 17px;
}

.preview-stage {
  align-items: flex-start;
  display: flex;
  justify-content: center;
  min-height: 0;
  overflow: auto;
  padding: 34px 40px 50px;
  scrollbar-color: #bdb7ac transparent;
}

.preview-frame-wrap {
  background: var(--white);
  box-shadow: var(--shadow);
  flex: 0 0 auto;
  min-height: 900px;
  transition: width 220ms ease;
  width: 784px;
}

.preview-frame-wrap.is-mobile {
  width: 390px;
}

#email-preview {
  border: 0;
  display: block;
  height: 100%;
  min-height: 1500px;
  width: 100%;
}

.readiness {
  align-items: flex-start;
  background: rgba(246, 243, 237, 0.95);
  border-top: 1px solid rgba(103, 96, 83, 0.18);
  display: grid;
  gap: 24px;
  grid-template-columns: 180px 1fr;
  padding: 19px 30px 20px;
}

.readiness .eyebrow {
  margin-bottom: 4px;
}

.readiness strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
}

.readiness ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.readiness li {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  color: #5f5b53;
  display: inline-flex;
  font-size: 10px;
  gap: 6px;
  padding: 7px 9px;
}

.readiness li::before {
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  height: 5px;
  width: 5px;
}

.readiness li.is-ready {
  color: var(--success);
}

.readiness li.is-warning {
  color: var(--danger);
}

.export-dialog {
  background: var(--panel);
  border: 0;
  box-shadow: 0 30px 100px rgba(17, 17, 16, 0.35);
  max-width: calc(100vw - 40px);
  padding: 42px;
  width: 540px;
}

.export-dialog::backdrop {
  background: rgba(16, 15, 14, 0.72);
  backdrop-filter: blur(3px);
}

.export-dialog h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 33px;
  font-weight: 400;
  line-height: 39px;
  margin: 0 0 12px;
}

.export-dialog > form > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 21px;
  margin: 0 0 23px;
}

.dialog-close {
  background: transparent;
  border: 0;
  color: #807c73;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 27px;
  padding: 8px;
  position: absolute;
  right: 17px;
  top: 12px;
}

.export-warning {
  background: #f2e4df;
  color: #77483f;
  font-size: 11px;
  line-height: 17px;
  margin-bottom: 20px;
  padding: 13px 15px;
}

.export-options {
  border-top: 1px solid var(--line);
  margin-bottom: 24px;
}

.export-option {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: grid;
  gap: 15px;
  grid-template-columns: 46px 1fr;
  padding: 17px 6px;
  text-align: left;
  width: 100%;
}

.export-option:hover {
  background: #f2efe9;
}

.export-icon {
  align-items: center;
  border: 1px solid var(--line-dark);
  display: flex;
  font-family: Georgia, serif;
  font-size: 15px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.export-option strong,
.export-option small {
  display: block;
}

.export-option strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 3px;
}

.export-option small {
  color: #77736b;
  font-size: 10px;
}

.dialog-done {
  border-color: var(--line-dark);
  color: #57534c;
  width: 100%;
}

.button-signout {
  background: transparent;
  border: 1px solid var(--line-dark);
  color: #5d5951;
  width: 100%;
}

.button-signout:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.login-dialog {
  background: var(--panel);
  border: 0;
  box-shadow: 0 30px 100px rgba(17, 17, 16, 0.45);
  max-width: calc(100vw - 36px);
  padding: 46px 44px 42px;
  width: 440px;
}

.login-dialog::backdrop {
  background: rgba(16, 15, 14, 0.82);
  backdrop-filter: blur(5px);
}

.login-dialog h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 38px;
  margin: 0 0 12px;
}

.login-dialog p:not(.eyebrow, .login-error) {
  color: var(--muted);
  line-height: 21px;
  margin: 0 0 24px;
}

.login-mark {
  border-color: var(--ink);
  margin-bottom: 27px;
}

.login-field {
  margin-bottom: 8px;
}

.login-error {
  color: var(--danger);
  font-size: 11px;
  line-height: 17px;
  min-height: 18px;
  margin: 4px 0 11px;
}

.button-login {
  background: var(--ink);
  color: var(--white);
  width: 100%;
}

.toast {
  background: var(--ink);
  bottom: 24px;
  color: var(--white);
  font-size: 11px;
  left: 50%;
  opacity: 0;
  padding: 12px 17px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 50;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: minmax(390px, 46%) 1fr;
  }

  .preview-stage {
    justify-content: flex-start;
    padding-left: 25px;
    padding-right: 25px;
  }

  .readiness {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 800px) {
  .app-header {
    gap: 12px;
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
  }

  .header-status {
    display: none;
  }

  .header-actions .button-quiet {
    display: none;
  }

  .workspace {
    display: block;
    height: auto;
    overflow: visible;
  }

  .editor {
    border-right: 0;
    overflow: visible;
  }

  .tabs {
    top: 0;
  }

  .preview-area {
    min-height: 100vh;
  }

  .preview-stage {
    min-height: 900px;
    overflow: auto;
  }
}

@media (max-width: 520px) {
  .brand small {
    display: none;
  }

  .brand-mark {
    height: 36px;
    width: 36px;
  }

  .brand strong {
    font-size: 17px;
  }

  .header-actions .button {
    min-height: 36px;
    padding: 0 12px;
  }

  .editor-intro,
  .tab-panel {
    padding-left: 22px;
    padding-right: 22px;
  }

  .field-row,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .preview-toolbar {
    padding-left: 20px;
    padding-right: 20px;
  }

  .preview-stage {
    padding-left: 10px;
    padding-right: 10px;
  }

  .readiness {
    padding-left: 20px;
    padding-right: 20px;
  }

  .export-dialog {
    padding: 34px 24px 26px;
  }
}
