:root {
  --ink: #f4f4f2;
  --mute: #8a8a86;
  --line: #2a2a28;
  --paper: #111110;
  --field: #191918;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

main {
  flex: 1;
  width: min(40rem, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 calc(96px + env(safe-area-inset-bottom));
}

h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.lead,
.restored,
.hint {
  margin: 8px 0 0;
  color: var(--mute);
}

.restored {
  margin-bottom: 16px;
}

.rail {
  margin-bottom: 22px;
}

.rail ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--mute);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.rail button[aria-current="step"] {
  color: var(--ink);
}

.rail button:disabled {
  cursor: default;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 20px;
}

.field span,
.links-label,
legend {
  color: var(--mute);
  font-size: 14px;
}

legend {
  margin-bottom: 8px;
  padding: 0;
}

input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 88px;
}

input::placeholder,
textarea::placeholder {
  color: #5e5e5a;
}

.drop {
  display: flex;
  align-items: center;
  min-height: 96px;
  margin-top: 20px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  cursor: pointer;
}

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

.drop-idle,
.drop-file {
  color: var(--mute);
}

.drop.has-file .drop-idle {
  display: none;
}

.drop.has-file .drop-file {
  display: block;
  color: var(--ink);
}

.error {
  margin: 8px 0 0;
  color: #e7b2a8;
}

.presets,
.plans,
.photo,
.accents {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.presets label,
.plans label {
  display: block;
  margin-top: 8px;
}

.presets input,
.plans input,
.photo input,
.accents input {
  position: absolute;
  opacity: 0;
}

.presets label > span,
.plans label > span,
.photo label > span {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.presets label strong,
.plans label strong {
  display: block;
  font-weight: 560;
}

.presets label small,
.plans label small {
  display: block;
  margin-top: 2px;
  color: var(--mute);
}

.presets input:checked + span,
.plans input:checked + span,
.photo input:checked + span,
.presets input:focus-visible + span,
.plans input:focus-visible + span,
.photo input:focus-visible + span {
  border-color: var(--ink);
}

.presets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.presets legend {
  grid-column: 1 / -1;
}

.presets label {
  margin-top: 0;
}

.presets label > span {
  height: 100%;
  padding: 8px 8px 12px;
}

.presets label strong {
  padding: 0 4px;
}

.presets label small {
  padding: 0 4px;
  font-size: 13px;
}

.preview {
  --a: #f3f1ec;
  --ink: #ecebe6;
  --dim: #85847d;
  --hair: #262624;
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  margin-bottom: 10px;
  overflow: hidden;
  container-type: inline-size;
  border: 1px solid #2f2f2c;
  border-radius: 8px;
  background: #0f0f0e;
  color: var(--ink);
  font-family: system-ui, sans-serif;
  line-height: 1.25;
  text-align: left;
  user-select: none;
}

.presets .preview {
  padding: 0;
}

.preview .bar {
  display: block;
  height: 8cqw;
  border-bottom: 1px solid var(--hair);
  background: #131312;
  color: #6d6d66;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 2.8cqw;
  line-height: 8cqw;
  text-align: center;
}

.preview .page {
  position: absolute;
  inset: 8cqw 0 0;
  display: block;
  padding: 6cqw 7cqw;
}

.preview .mono,
.preview .row i,
.preview .num,
.preview .meta {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-style: normal;
}

.preview .nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 3.6cqw;
}

.preview .nav b {
  font-size: 4.2cqw;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.preview .nav span {
  color: var(--dim);
}

.preview .serif {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.preview u {
  text-decoration-color: var(--a);
  text-decoration-thickness: 0.5cqw;
  text-underline-offset: 1cqw;
}

/* Plain */
.m-plain .hero {
  display: block;
  margin-top: 7cqw;
  font-size: 8cqw;
  line-height: 1.1;
}

.m-plain .rows {
  display: block;
  margin-top: 6.5cqw;
}

.m-plain .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2.4cqw 0;
  border-top: 1px solid var(--hair);
  font-size: 3.8cqw;
}

.m-plain .row i {
  color: var(--dim);
  font-size: 3cqw;
}

/* Cards */
.m-cards .nav u {
  color: var(--ink);
}

.m-cards .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5cqw;
  margin-top: 5cqw;
}

.m-cards .card {
  display: block;
}

.m-cards .art {
  position: relative;
  display: block;
  height: 30cqw;
  overflow: hidden;
  border-radius: 1cqw;
  background: var(--a);
}

.m-cards .art::after {
  content: "";
  position: absolute;
  background: #0f0f0e;
}

.m-cards .a1::after {
  right: -8%;
  bottom: -18%;
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
}

.m-cards .a2 {
  background: #1c1c1a;
}

.m-cards .a2::after {
  inset: 22% 18% 22% 18%;
  background: var(--a);
}

.m-cards .card b {
  display: block;
  margin-top: 2.4cqw;
  font-size: 3.8cqw;
  font-weight: 600;
}

.m-cards .card i {
  display: block;
  margin-top: 0.6cqw;
  color: var(--dim);
  font-size: 3cqw;
  font-style: normal;
}

/* Split */
.m-split {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 7cqw;
}

.m-split .kicker {
  display: block;
  color: var(--dim);
  font-size: 2.8cqw;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.m-split .rule {
  display: block;
  width: 7cqw;
  height: 0.8cqw;
  margin: 4cqw 0 3.4cqw;
  background: var(--a);
}

.m-split .big {
  display: block;
  font-size: 9cqw;
  line-height: 1.04;
}

.m-split .copy {
  display: block;
  margin-top: 4cqw;
  color: #b3b2ab;
  font-size: 3.6cqw;
  line-height: 1.4;
}

.m-split .work {
  display: block;
  align-self: end;
}

.m-split .item {
  display: grid;
  grid-template-columns: 6cqw 1fr;
  padding: 3.2cqw 0;
  border-top: 1px solid var(--hair);
}

.m-split .item:last-child {
  border-bottom: 1px solid var(--hair);
}

.m-split .num {
  color: var(--a);
  font-size: 2.8cqw;
  line-height: 1.7;
}

.m-split .item b {
  display: block;
  font-size: 3.8cqw;
  font-weight: 600;
}

.m-split .meta {
  display: block;
  margin-top: 0.6cqw;
  color: var(--dim);
  font-size: 2.8cqw;
}

/* Quiet */
.m-quiet {
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
}

.m-quiet .nav {
  justify-content: flex-start;
}

.m-quiet .big {
  display: block;
  max-width: 92%;
  font-size: 8.8cqw;
  line-height: 1.1;
}

.m-quiet .foot {
  display: flex;
  gap: 5cqw;
  color: var(--dim);
  font-size: 3.2cqw;
}

.m-quiet .foot span:first-child {
  color: var(--ink);
}

.result {
  margin-top: 28px;
}

.result-label {
  margin: 0 0 8px;
  color: var(--mute);
  font-size: 14px;
}

.result .preview {
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
}

.result-meta {
  margin: 10px 0 0;
  color: var(--mute);
  font-size: 14px;
}

.done-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
}

.done-actions .text-btn {
  text-decoration: none;
}

.plans label b {
  display: block;
  margin: 4px 0;
  font-size: 18px;
  font-weight: 560;
}

.extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 16px;
}

.extras > div:first-child {
  flex: 1 1 12rem;
  min-width: 0;
}

.extras .hint {
  margin-top: 4px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.stepper button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.stepper input {
  width: 2.2rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  text-align: center;
  -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.plans label b small {
  display: inline;
  margin-left: 6px;
  font-size: 14px;
  font-weight: 400;
}

.photo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo legend {
  flex: 0 0 100%;
}

.photo label span {
  padding: 8px 12px;
}

.accents {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.accents legend {
  flex: 0 0 100%;
}

.accents label {
  position: relative;
}

.accents span[style] {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.accents input:checked + span,
.accents input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.links {
  margin-top: 20px;
}

.links-label {
  margin: 0;
}

.link-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.link-row button,
.text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--mute);
  font: inherit;
  cursor: pointer;
}

.link-row button {
  flex: 0 0 auto;
}

.text-btn:hover,
.link-row button:hover {
  color: var(--ink);
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 560;
  cursor: pointer;
}

.button:active {
  transform: scale(0.98);
}

.review {
  margin: 20px 0 0;
}

.review div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.review dt {
  color: var(--mute);
}

.review dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.agree {
  margin: 18px 0 0;
  color: var(--mute);
  font-size: 14px;
}

.agree a {
  color: var(--ink);
}

.promo-code {
  margin: 22px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-align: center;
}

.done .text-btn {
  margin-top: 16px;
}

footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--paper);
  color: var(--mute);
  font-size: 14px;
}

.logo img {
  display: block;
  width: 36px;
  height: auto;
}

footer nav {
  display: flex;
  gap: 14px;
  padding-bottom: 6px;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer nav a:hover {
  color: var(--ink);
}

@media (min-width: 640px) {
  .presets {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 720px) {
  .plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .plans legend {
    grid-column: 1 / -1;
  }

  .plans label {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button:active {
    transform: none;
  }
}

.receipt {
  margin: 20px 0 0;
}

.receipt div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.receipt div:last-child {
  border-bottom: 1px solid var(--line);
}

.receipt dt {
  color: var(--mute);
}

.receipt dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.next {
  margin: 24px 0 0;
  padding: 0;
  color: var(--mute);
  list-style: none;
}

.next li + li {
  margin-top: 6px;
}

.next li::before {
  content: "\2192\00a0\00a0";
  color: var(--ink);
}
