:root {
  --paper: #faf9f4;
  --card: #fffefa;
  --ink: #1f3429;
  --green: #284e37;
  --muted: #526156;
  --line: #cdd3c7;
  --sage: #e9eee3;
  --serif: 'Instrument Serif', Georgia, serif;
  font:
    100%/1.55 'DM Sans',
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0 auto;
  width: min(100% - 3rem, 74rem);
}
a {
  color: var(--green);
  text-underline-offset: 0.22em;
}
:focus-visible {
  outline: 3px solid #ad5836;
  outline-offset: 3px;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.04;
}
h2 {
  font-size: clamp(1.85rem, 4vw, 3.4rem);
}
h3 {
  font-size: 1.05rem;
}
img,
canvas {
  display: block;
  max-width: 100%;
}
.masthead,
footer,
.editor-heading,
.step-head,
.buttons,
.hero-actions,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.masthead {
  min-height: 4.6rem;
  border-bottom: 1px solid var(--line);
}
.masthead a {
  text-decoration: none;
}
.masthead a:last-child {
  order: -1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 750;
  font-size: 1.35rem;
  letter-spacing: -0.05em;
}
.masthead a:last-child::before {
  content: '';
  display: block;
  width: 1rem;
  height: 1.4rem;
  border: 3px solid var(--green);
  border-radius: 1rem 1rem 0 0;
  background: linear-gradient(107deg, transparent 51%, var(--green) 52%);
}
.brand {
  font: 1.55rem var(--serif);
  letter-spacing: -0.05em;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2.8rem, 6vw, 5.5rem) 0;
}
.hero h1 {
  font-size: clamp(3rem, 5.4vw, 5.2rem);
  max-width: 13ch;
}
.hero h1 em {
  color: #526951;
  font-weight: 400;
}
.hero-copy > p:not(.price-line) {
  max-width: 44ch;
  font-size: 1.1rem;
  margin: 1.35rem 0 1.6rem;
  color: var(--muted);
}
.hero-actions {
  justify-content: flex-start;
  gap: 1.2rem;
}
.hero-actions > a:not(.primary) {
  font-size: 0.92rem;
  font-weight: 600;
}
.price-line {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.8rem 0;
}
.price-line strong {
  color: var(--ink);
}
button,
.primary,
.file-label {
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border-radius: 0.4rem;
  border: 1px solid #a7b4a4;
  color: var(--green);
  background: var(--card);
  line-height: 1.3;
  font-family: inherit;
  font-size: 0.91rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.primary,
.file-label {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary span {
  margin-left: 0.8rem;
}
.hero-actions .primary {
  padding: 0.85rem 1.15rem;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button:not(:disabled):hover,
.file-label:hover {
  filter: brightness(0.94);
}
.hero-sample {
  background: #e1e9db;
  padding: clamp(0.75rem, 1.6vw, 1.4rem);
  border-radius: 0.7rem;
  box-shadow: 0 14px 32px #26332515;
}
.hero-sample img {
  width: 100%;
  height: auto;
  border-radius: 0 0 0.25rem 0.25rem;
}
.hero-sample figcaption {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.85rem;
  background: var(--card);
  font-size: 0.95rem;
  font-weight: 650;
  border-radius: 0.25rem 0.25rem 0 0;
}
.badge {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  width: 1.7rem;
  height: 1.7rem;
  font-variant-numeric: tabular-nums;
}
.how,
.example,
.faq {
  border-top: 1px solid var(--line);
  padding: clamp(2.25rem, 5vw, 4rem) 0;
}
.how ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-left: 1.45rem;
  margin: 1.7rem 0 0;
}
.how li::marker {
  color: var(--green);
  font-weight: 700;
}
.how li span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
}
.example {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: clamp(2rem, 8vw, 8rem);
  align-items: center;
}
.example p {
  margin: 0.8rem 0 1.35rem;
  max-width: 37ch;
}
.example img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
}
.example figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.4rem 0;
}
.example > figure {
  max-width: 25rem;
}
.faq {
  max-width: 54rem;
}
.faq h2 {
  margin-bottom: 1.4rem;
}
.faq details {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
}
.faq details p {
  max-width: 64ch;
  margin: 0.55rem 0;
  color: var(--muted);
}
footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}
footer nav {
  display: flex;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
}
footer nav a {
  overflow-wrap: anywhere;
}
.legal {
  max-width: 44rem;
  min-height: 65vh;
  padding: 4rem 0;
}
.legal h1,
.editor-heading h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  margin: 1rem 0;
}
.legal p {
  margin-bottom: 1rem;
}
#editor {
  padding: 2rem 0 3.5rem;
}
.editor-heading {
  margin-bottom: 1.5rem;
}
.editor-heading > div > a {
  font-size: 0.87rem;
}
fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.85fr);
  gap: 2rem;
  align-items: start;
}
.sheet,
.result {
  min-width: 0;
  border-top: 1px solid #879987;
  padding: 1.2rem 0;
}
.sheet h2,
.result h2 {
  font-family: inherit;
  font-weight: 680;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  line-height: 1.4;
  margin: 0 0 1rem;
}
.field {
  display: grid;
  gap: 0.3rem;
  margin: 0.75rem 0;
}
.field > span,
.sheet h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.field small,
.sheet small,
.hint {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}
select,
input:not([type='file']) {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  border: 1px solid #a9b4a7;
  border-radius: 0.4rem;
  background: var(--card);
  font: inherit;
  color: var(--ink);
}
.hint {
  margin: 0.65rem 0;
}
.drop {
  padding: 1.5rem 1rem;
  border: 1px dashed #82957f;
  border-radius: 0.5rem;
  text-align: center;
  background: var(--sage);
}
.drop.over {
  outline: 3px solid var(--green);
}
.drop p {
  display: inline-block;
  margin: 0 0.3rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.drop small {
  display: block;
  margin-top: 0.6rem;
}
.file-label {
  position: relative;
}
.file-label:focus-within {
  outline: 3px solid #ad5836;
  outline-offset: 2px;
}
.file-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.export {
  margin-top: 1rem;
}
.export .price-line {
  margin: 1rem 0 0.45rem;
}
.notice,
#errors {
  color: #693e22;
}
.notice {
  background: #f6e7cf;
  padding: 0.85rem 1rem;
  border-radius: 0.4rem;
  margin: 1rem 0;
}
.notice a {
  font-weight: 600;
}
.notice button {
  margin-left: 0.35rem;
}
#errors:empty,
#import-status:empty,
#export-status:empty {
  display: none;
}
#errors {
  padding-left: 1.3rem;
}
#export-status,
#import-status {
  margin: 0.75rem 0;
  font-size: 0.93rem;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
aside[aria-label='Analytics preferences'] {
  padding: 1rem;
  background: var(--sage);
  margin: 1rem 0;
}
aside[aria-label='Analytics preferences'] p {
  margin-bottom: 0.5rem;
}

.hero-sample {
  max-width: 25rem;
  justify-self: center;
  padding: 0.8rem;
  background: #e2e6d9;
  transform: rotate(2deg);
}
.hero-sample img {
  border-radius: 0.25rem;
}
.example {
  grid-template-columns: 1.3fr 0.85fr 0.55fr;
  gap: 1.5rem;
  align-items: center;
}
.example-title {
  grid-column: 1/-1;
}
.example-title p {
  margin-bottom: 0;
}
.example-extras {
  display: grid;
  gap: 1rem;
}
button,
.primary,
.file-label,
.buttons button,
.toolbar button,
summary {
  min-height: 44px;
}
.buttons,
.toolbar,
.add-buttons,
.preview-nav,
.step-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.toolbar {
  margin: 0.45rem 0;
}
.toolbar button,
.buttons button {
  padding: 0.45rem 0.7rem;
  font-size: 0.88rem;
}
.toolbar [aria-pressed='true'] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.edit-layout {
  display: grid;
  grid-template-columns: minmax(6rem, 0.38fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  margin-top: 1rem;
}
.surface {
  min-width: 0;
}
#drawing {
  width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  touch-action: none;
  background: #c7cdc4;
  border-radius: 0.25rem;
  cursor: grab;
  display: block;
}
#drawing[data-mode='circle'],
#drawing[data-mode='arrow'],
#drawing[data-mode='crop'] {
  cursor: crosshair;
}
#steps,
#library-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
#steps {
  display: grid;
  gap: 0.45rem;
  max-height: 35rem;
  overflow: auto;
  padding: 4px;
}
#steps button {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.22rem;
  padding: 0.38rem;
  width: 100%;
  text-align: left;
  border-radius: 0.3rem;
  font-size: 0.75rem;
  min-width: 0;
}
#steps img {
  height: 3.5rem;
  width: 100%;
  object-fit: cover;
  border-radius: 0.12rem;
  grid-column: 1/-1;
}
#steps b {
  font-variant-numeric: tabular-nums;
}
#steps span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#steps [aria-current='true'] {
  background: #e4eddf;
  border: 2px solid var(--green);
}
#empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 1rem;
  max-width: 31rem;
  text-align: left;
}
#empty img {
  width: 4.2rem;
  height: auto;
}
#empty p {
  font-size: 0.95rem;
}
.add-buttons {
  justify-content: center;
}
.camera {
  display: none;
  background: var(--card);
  color: var(--green);
}
.step-actions,
.history {
  margin-top: 0.8rem;
}
#library-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 0.7rem 0;
}
#library-list div {
  flex: 1 1 12rem;
}
#library-list small {
  display: block;
}
#library-list img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 0.25rem;
}
.result {
  background: var(--sage);
  padding: 1rem 1.2rem;
  border-radius: 0.45rem;
}
#preview {
  display: grid;
  place-items: center;
  padding: 0.65rem;
  background: #dbe2d4;
  min-height: 4.5rem;
}
#preview canvas {
  object-fit: contain;
  width: auto;
  height: auto;
  max-height: 30rem;
  max-width: 100%;
  box-shadow: 0 0.2rem 0.75rem #27322420;
}
.preview-nav {
  justify-content: center;
  margin: 0.5rem 0;
  font-size: 0.85rem;
}
#individual {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.5rem 0;
}
.export > button {
  margin: 0.15rem 0.12rem 0.15rem 0;
}
.export h2 {
  margin-top: 1.2rem;
}
#plan-note {
  display: block;
  color: var(--muted);
  margin: 0.4rem 0;
}
#recovery {
  border-top: 1px solid var(--line);
  margin-top: 0.75rem;
  padding-top: 0.4rem;
}
#recovery summary,
.faq summary {
  cursor: pointer;
  align-content: center;
}
#recovery p {
  font-size: 0.88rem;
  margin: 0.4rem 0;
}
@media (pointer: coarse), (max-width: 48rem) {
  .camera {
    display: inline-flex;
  }
}
@media (max-width: 48rem) {
  body {
    width: min(100% - 1.5rem, 43rem);
  }
  .hero,
  .editor-grid,
  .edit-layout,
  .how ol {
    grid-template-columns: 1fr;
  }
  .hero {
    gap: 1.75rem;
    padding: 2.3rem 0;
  }
  .hero h1 {
    max-width: 14ch;
  }
  .hero-sample {
    width: 65%;
    max-width: 20rem;
  }
  .example {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }
  .example-extras {
    grid-column: 1/-1;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .example-extras img {
    max-height: 9rem;
    width: auto;
  }
  .editor-heading,
  .toolbar {
    gap: 0.35rem;
  }
  .editor-heading {
    align-items: end;
  }
  .editor-grid {
    gap: 1rem;
  }
  .edit-layout {
    gap: 0.25rem;
  }
  .surface {
    grid-row: 1;
  }
  #steps {
    display: flex;
    max-height: none;
    overflow-x: auto;
    max-width: 100%;
  }
  #steps li {
    flex: 0 0 5.7rem;
  }
  #steps button {
    min-height: 75px;
  }
  .result {
    position: static;
  }
  .masthead {
    min-height: 3.7rem;
  }
  .how ol {
    gap: 1rem;
  }
  .drop {
    padding: 0.8rem;
  }
  footer {
    align-items: flex-start;
  }
  .preview-nav button,
  .toolbar button {
    min-width: 44px;
  }
}
