* {
  box-sizing: border-box;
}
:root {
  --ink: #1d3228;
  --green: #204f3d;
  --muted: #666b60;
  --line: #d6d7ca;
  --paper: #fbfaf5;
  --rust: #a4442b;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', Arial, sans-serif;
}
html {
  color: var(--ink);
  background: #f6f5ee;
  font: 16px/1.5 var(--sans);
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
}
button,
a {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #aa562f;
  outline-offset: 3px;
}
button {
  border: 0;
}
a {
  color: inherit;
}
.wrap {
  max-width: 1220px;
  margin: auto;
  padding-inline: clamp(20px, 4vw, 60px);
}
.top {
  border-top: 4px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.bar,
.brand,
.sample,
.eyebrow,
.actions,
.pager,
.privacy,
.preview-head,
.foot {
  display: flex;
  align-items: center;
}
.bar {
  min-height: 75px;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  gap: 12px;
  text-decoration: none;
  font: 700 clamp(19px, 2.1vw, 28px) / 1 var(--serif);
  letter-spacing: -0.055em;
}
.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 38px;
  border: 1px solid #526154;
  outline: 1px solid #526154;
  outline-offset: -4px;
  font: italic 700 25px var(--serif);
  background: var(--ink);
  color: #faf8e9;
}
.sample {
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-underline-offset: 4px;
}
.sample span {
  font-size: 17px;
}
.intro {
  padding: 34px 0 25px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  font-weight: 750;
  color: var(--rust);
  gap: 8px;
  margin: 0;
}
.eyebrow i {
  width: 24px;
  border-top: 2px solid currentColor;
}
.intro h1,
h2,
p {
  margin: 0;
}
.intro h1 {
  font: normal clamp(42px, 5.1vw, 70px) / 1.08 var(--serif);
  letter-spacing: -0.065em;
  margin: 8px 0;
}
.intro h1 span {
  color: var(--rust);
}
.intro > p:last-child,
.hint {
  color: var(--muted);
  font-size: 15px;
}
nav {
  border-block: 1px solid var(--line);
}
#steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
#steps button {
  position: relative;
  background: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: #6b6d64;
  text-align: left;
}
#steps button[aria-current] {
  color: var(--green);
}
#steps button[aria-current]:after {
  content: '';
  position: absolute;
  inset: auto 0 -1px;
  height: 3px;
  background: var(--green);
}
.num {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #b7baac;
  border-radius: 50%;
  font-size: 11px;
}
button[aria-current] .num,
button.done .num {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 24px;
  margin: 26px 0 38px;
}
.editor,
.preview {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.editor-inner {
  padding: clamp(20px, 2.7vw, 37px);
}
.editor h2 {
  font: normal clamp(30px, 3vw, 42px) / 1.08 var(--serif);
  letter-spacing: -0.055em;
  margin: 10px 0;
}
.hint {
  line-height: 1.55;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 21px;
}
.choice {
  position: relative;
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: 6px;
  padding: 22px 10px 12px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  cursor: pointer;
}
.choice.selected {
  border-color: var(--green);
  background: #f2f3e9;
}
.choice input {
  position: absolute;
  right: 7px;
  top: 7px;
  margin: 0;
  accent-color: var(--green);
  width: 17px;
  height: 17px;
}
.draft-tools {
  margin-top: 16px;
  padding: 10px 14px;
  border-left: 3px solid var(--green);
  background: #edf0e7;
  font-size: 13px;
}
.draft-tools button + button {
  margin-left: 12px;
}
.choice strong {
  display: block;
  font: 600 clamp(17px, 2vw, 22px) / 1.08 var(--serif);
  letter-spacing: -0.04em;
  margin: 6px 0;
}
.choice small {
  font-size: 11px;
  color: var(--muted);
  font-style: normal;
}
.choice .eyebrow {
  font-size: 9px;
  color: var(--green);
}
.mini {
  display: block;
  width: 58px;
  height: auto;
  border: 1px solid #c6c5b6;
  box-shadow: 2px 3px 4px #28322420;
}
.actions {
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.primary,
.quiet,
.pager button,
.edit {
  border-radius: 4px;
}
.primary {
  margin-left: auto;
  background: var(--green);
  color: white;
  font-weight: 650;
  font-size: 14px;
  padding: 13px 20px;
}
.primary:hover {
  background: #173d2e;
}
.primary:disabled {
  opacity: 0.6;
}
.quiet,
.edit {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 10px 2px;
  font-size: 13px;
}
.privacy {
  padding: 15px 20px;
  background: #f1f1e8;
  border-top: 1px solid var(--line);
  color: #556457;
  gap: 8px;
  font-size: 12px;
}
.privacy span {
  font-size: 20px;
  line-height: 1;
}
.draft-preference {
  display: grid;
  gap: 5px;
  align-items: start;
}
.draft-preference [role='status'] {
  font-weight: 650;
  color: var(--ink);
}
.draft-preference-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 15px;
}
.draft-preference-actions a {
  text-underline-offset: 3px;
}
.preview-head,
.pager {
  justify-content: space-between;
  padding: 12px 19px;
}
.preview-head h2 {
  font: 600 18px var(--serif);
  letter-spacing: -0.035em;
}
.preview-head > span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.desk {
  padding: 24px 15%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 30% 10%, #e0e2d3, transparent 70%),
    repeating-linear-gradient(110deg, #c7cdbc 0 2px, #c9cfbe 2px 4px);
  border-block: 1px solid var(--line);
}
#paper {
  width: 100%;
  max-width: 340px;
  height: auto;
  aspect-ratio: 210/297;
  background: #fffdf6;
  box-shadow: 2px 6px 13px #34402c3d;
  transform: rotate(-1.3deg);
}
.pager {
  font: 14px var(--serif);
}
.pager button {
  width: 35px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--line);
  font-size: 17px;
}
.pager button:disabled {
  opacity: 0.35;
}
.foot {
  justify-content: space-between;
  padding-block: 20px;
  border-top: 1px solid var(--line);
  font: 13px var(--serif);
  color: var(--muted);
}
.field {
  display: block;
  margin-top: 18px;
}
.field > span,
.photo-title {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 5px;
}
.field input,
.field textarea {
  display: block;
  border: 1px solid #aeb6a7;
  border-radius: 4px;
  background: white;
  width: 100%;
  padding: 10px 12px;
}
.field textarea {
  resize: vertical;
  min-height: 85px;
}
.field small,
.photo small {
  color: var(--muted);
  font-size: 12px;
}
.photo {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 13px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.photo img {
  width: 70px;
  height: 74px;
  object-fit: cover;
  background: #e6e8df;
  border-radius: 3px;
}
.photo input {
  display: block;
  margin: 6px 0;
  width: 100%;
  font-size: 12px;
}
.error {
  color: #953f2b;
  font-size: 14px;
  margin-top: 10px;
}
.error:empty {
  display: none;
}
.summary {
  margin-top: 20px;
}
.summary div {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 14px;
}
.summary div span {
  overflow-wrap: anywhere;
}
.mobile-show {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (min-width: 781px) {
  .preview {
    position: sticky;
    top: 18px;
  }
}
@media (max-width: 780px) {
  .bar {
    min-height: 60px;
  }
  .intro {
    padding: 24px 0 18px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 18px;
  }
  .editor-inner {
    padding: 22px;
  }
  .desk {
    padding: 23px 15%;
  }
  .preview {
    max-width: 550px;
    width: 100%;
    margin: auto;
  }
  #steps button {
    gap: 5px;
    font-size: 11px;
    min-height: 48px;
  }
  .num {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
  .sample {
    font-size: 12px;
  }
  .foot {
    gap: 18px;
  }
  .photo input {
    font-size: 14px;
  }
  .preview-head h2 {
    font-size: 17px;
  }
}
@media (max-width: 400px) {
  .wrap {
    padding-inline: 13px;
  }
  .editor-inner {
    padding: 17px;
  }
  .sample {
    font-size: 11px;
  }
  .brand {
    gap: 6px;
  }
  .num {
    width: 16px;
    height: 16px;
  }
  #steps button {
    font-size: 10px;
  }
}
@media (max-width: 520px), (min-width: 781px) and (max-width: 1010px) {
  .choice {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: start;
    justify-items: start;
    padding: 10px;
    gap: 8px;
  }
}

#reader {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  max-height: 92dvh;
  width: min(790px, 96vw);
  max-width: 96vw;
  color: var(--ink);
  background: var(--paper);
}
#reader::backdrop {
  background: #15251caa;
}
.reader-tools {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.reader-tools button {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px;
  background: transparent;
}
.reader-tools button:disabled {
  opacity: 0.35;
}
#close-reader {
  margin-left: auto;
}
#reader-paper {
  width: 100%;
  height: auto;
  display: block;
}
.preview-head .edit {
  padding: 3px 0;
}
