* {
  box-sizing: border-box;
}
html {
  background: #f7f5ef;
  color: #262b26;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
body {
  margin: 0;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
button,
select,
.resources a {
  cursor: pointer;
}
button,
.resources a,
select {
  border: 1px solid #bdc2b4;
  border-radius: 5px;
  background: #fffdf7;
  padding: 0.65rem 1rem;
}
button:hover,
a:hover {
  color: #256242;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #447759;
  outline-offset: 2px;
}
.primary {
  background: #224e3c;
  color: white;
  border-color: #224e3c;
}
.primary:hover {
  background: #193b2c;
  color: white;
}
.bar {
  max-width: 1300px;
  margin: auto;
  padding: 20px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #cfcfc3;
  gap: 18px;
}
.brand {
  font:
    700 29px Georgia,
    serif;
  letter-spacing: -1.5px;
  color: inherit;
  text-decoration: none;
}
.brand span {
  font: 11px Arial;
  vertical-align: top;
}
nav,
.actions,
.resources {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
nav button {
  border: 0;
  background: none;
}
nav [aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
}
main {
  max-width: 1300px;
  margin: auto;
  padding: 34px 5% 65px;
}
.lede {
  font-size: 20px;
  line-height: 1.5;
  max-width: 32em;
}
figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #e7e2d4;
}
figcaption strong {
  font: 24px Georgia;
}
.resources {
  border-top: 1px solid #cfcec4;
  margin-top: 32px;
  padding-top: 22px;
}
.resources a {
  color: #324a38;
  text-decoration: none;
}
.sectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
}
h2 {
  font:
    normal 40px/1.1 Georgia,
    serif;
  margin: 12px 0 20px;
}
h3 {
  font-size: 18px;
}
aside {
  background: #efeee6;
  border-radius: 8px;
  padding: 0 18px 18px;
  align-self: start;
}
.work {
  display: grid;
  grid-template-columns: minmax(215px, 26%) 1fr;
  gap: 24px;
}
label {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  font-size: 14px;
  font-weight: 550;
}
input,
select {
  max-width: 100%;
  min-width: 0;
}
input:not([type="color"]):not([type="checkbox"]) {
  border: 1px solid #bbbfb6;
  background: #fffefa;
  border-radius: 4px;
  padding: 8px;
}
input[type="file"] {
  width: 100%;
  font-size: 12px;
}
#progress {
  font-size: 14px;
  color: #385a43;
}
.sheet {
  background: white;
  border-top: 7px solid var(--accent);
  padding: 24px;
  box-shadow: 0 4px 18px #302c2010;
}
.sheet header {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
}
.sheet header img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}
.sheet h2 {
  color: var(--accent);
  font-size: 30px;
  margin: 0;
}
.sheet header p {
  margin: 3px 0;
  overflow-wrap: anywhere;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 15px;
}
.card {
  min-width: 0;
  break-inside: avoid;
}
.card img,
.placeholder {
  width: 100%;
  height: 142px;
  object-fit: contain;
  background: #f3f1ed;
  display: block;
}
.card h4 {
  margin: 8px 0 3px;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.card p {
  margin: 3px 0;
  color: #4c5148;
  font-size: 14px;
}
.list {
  margin-top: 12px;
}
.list .card {
  display: grid;
  grid-template-columns: 60px 2fr 1fr 1fr;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding: 6px 0;
}
.list img,
.list .placeholder {
  width: 56px;
  height: 52px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
}
.row {
  display: grid;
  grid-template-columns: 24px 1fr 1.8fr 0.8fr 1fr;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  border-bottom: 1px solid #ddd;
}
.row input {
  width: 100%;
}
.draft,
.ref {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.ref img {
  width: 65px;
  height: 65px;
  object-fit: contain;
}
dialog {
  width: min(90%, 470px);
  border: 1px solid #bbb;
  border-radius: 8px;
  background: #faf9f4;
}
dialog::backdrop {
  background: #16271a60;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #26382c;
  color: white;
  border-radius: 5px;
  padding: 12px;
  z-index: 2;
}
#searchForm {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
[hidden] {
  display: none !important;
}
@media (max-width: 740px) {
  .bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 4%;
  }
  nav {
    gap: 0;
    max-width: 100%;
  }
  nav button,
  nav select {
    font-size: 13px;
    padding: 8px;
  }
  .work {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  main {
    padding: 16px 4% 45px;
  }
  .sectionHead {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sheet {
    padding: 12px;
  }
  .row {
    grid-template-columns: 20px 1fr 2fr;
  }
  .row input[type="file"] {
    grid-column: 2/4;
  }
  .actions {
    gap: 5px;
  }
  .ref {
    flex-wrap: wrap;
  }
}
@media print {
  html,
  body {
    background: white !important;
  }
  .bar,
  .sectionHead,
  aside,
  details,
  #notice,
  dialog,
  .view:not(#studio) {
    display: none !important;
  }
  main,
  .work,
  #studio,
  #preview {
    display: block !important;
    padding: 0;
    margin: 0;
    max-width: none;
  }
  .sheet {
    box-shadow: none;
    padding: 0;
    border: 0;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8mm;
  }
  .card img,
  .placeholder {
    height: 35mm;
  }
  .list img,
  .list .placeholder {
    height: 13mm;
  }
  .card {
    page-break-inside: avoid;
  }
  * {
    print-color-adjust: exact;
  }
}

#tray {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
#tray label {
  min-width: 0;
}
#tray img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #e9e7df;
}
#tray span {
  overflow-wrap: anywhere;
}
#shareResult:not([hidden]) {
  display: grid;
  justify-items: start;
  gap: 0.6rem;
  margin-block: 1rem;
}
#shareResult img {
  object-fit: contain;
  background: white;
}
#closeShare {
  margin-block-start: 1rem;
}
.steps {
  list-style: none;
  display: flex;
  max-width: 860px;
  padding: 0;
  gap: 16px;
  margin: 4px 0 32px;
}
.steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #556057;
  border-bottom: 2px solid #d4d8cd;
  padding: 10px 0;
}
.steps b {
  border: 1px solid #a4ada1;
  border-radius: 100%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
}
.steps [aria-current="step"] {
  color: #204935;
  border-color: #204935;
  font-weight: 700;
}
.steps [aria-current="step"] b {
  background: #204935;
  color: white;
}
#hostingPanel {
  margin-top: 22px;
  padding: 18px 24px;
  max-width: 850px;
}
#hostingPanel h3 {
  margin: 0;
}
#studio[data-stage="ready"] .work {
  display: block;
  max-width: 850px;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
@media (max-width: 600px) {
  .steps {
    gap: 8px;
  }
  .steps li {
    gap: 5px;
    font-size: 13px;
  }
  .steps b {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
  }
}
@media print {
  .steps,
  #uploadPanel,
  #hostingPanel {
    display: none !important;
  }
}

.draft {
  flex-wrap: wrap;
}
.draft strong {
  overflow-wrap: anywhere;
}

#plansDialog {
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: clamp(16px, 4vw, 28px);
}
#plansDialog h2 {
  margin-block-start: 0;
}
#plansDialog h3 {
  margin-block-end: 4px;
}
#plansDialog p {
  margin-block-start: 6px;
}
.planPrices {
  padding-inline-start: 1.4em;
}
.planPrices li + li {
  margin-block-start: 8px;
}
#editPlans {
  display: block;
  margin-block: 0 12px;
}
#tray .matchCard {
  display: grid;
  gap: 8px;
  min-width: 0;
  align-content: start;
}
#tray .matchCard strong {
  overflow-wrap: anywhere;
}
#tray .matchCard select,
#tray .matchCard input {
  width: 100%;
}
#tray .matchCard p {
  margin: 0;
  font-size: 0.85rem;
}
#walkthrough {
  max-width: 880px;
  margin-block-start: clamp(36px, 7vw, 76px);
  border-top: 1px solid #c8cec3;
  padding-block-start: 24px;
}
.walkHeading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.walkHeading h2 {
  margin: 0;
}
.walkHeading p {
  margin-block: 8px 0;
}
.walkVideo {
  display: block;
  margin-block-start: 16px;
  width: min(100%, 620px);
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #e9eee6;
}
.walkTranscript {
  margin-block-start: 20px;
}
.walkTranscript li + li {
  margin-block-start: 8px;
}
@media print {
  #walkthrough {
    display: none !important;
  }
}
.templatePage {
  max-width: 1060px;
}
.templatePage h1 {
  max-width: 15ch;
  font:
    normal clamp(36px, 6vw, 66px)/1.04 Georgia,
    serif;
  letter-spacing: -0.035em;
  margin: 0;
}
.templatePage section + section {
  margin-block-start: 36px;
}
.templateAction {
  display: inline-block;
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid #204935;
}
.templateAction.primary {
  color: #fffdf7;
}
.templateExample {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  align-items: center;
  gap: 18px;
  padding: clamp(12px, 4vw, 25px);
  background: #eeeee6;
  border-radius: 8px;
}
.templateExample h2 {
  font-size: 29px;
}
.templateExample table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.templateExample :is(td, th) {
  padding: 10px 6px;
  border-bottom: 1px solid #c8cec3;
}
.templateExample figure {
  margin: 0;
  background: #fffdf7;
  overflow: hidden;
  border-radius: 6px;
}
.templateExample img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.templatePage li + li {
  margin-block-start: 8px;
}

.homeIntro {
  max-width: 780px;
  margin-block: 0 20px;
}
.homeIntro h1 {
  font:
    normal clamp(32px, 5.3vw, 62px)/1.05 Georgia,
    serif;
  letter-spacing: -0.04em;
  margin: 0;
}
[dir="rtl"] .homeIntro h1 {
  letter-spacing: normal;
}
.homeIntro p {
  line-height: 1.5;
  max-width: 62ch;
  margin: 12px 0 8px;
}
.homeIntro small {
  color: #44594b;
}
#studio[data-stage="upload"] > .sectionHead,
#studio[data-stage="upload"] > #workPanel,
#studio[data-stage="upload"] > #hostingPanel {
  display: none !important;
}
#studio[data-stage="upload"] .steps {
  margin-block-end: 18px;
}
.homeUpload {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.uploadCard,
.homeExample {
  background: #fffdf7;
  border: 1px solid #d1d4c9;
  padding: clamp(14px, 2.5vw, 24px);
  border-radius: 8px;
  min-width: 0;
}
.uploadCard h2,
.homeExample h2 {
  font-size: 26px;
  margin: 0 0 12px;
}
.uploadCard .actions {
  margin-block-start: 16px;
}
.uploadCard .actions a {
  font-size: 0.91rem;
  text-underline-offset: 3px;
  color: #224e3c;
}
.homeExample {
  background: #eef0e9;
}
.exampleInput,
.exampleOutput {
  min-width: 0;
}
.homeExample small {
  display: block;
  color: #44594b;
  margin-bottom: 6px;
}
.exampleInput table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
  background: #fffdf7;
  font-size: 0.82rem;
}
.exampleInput :is(th, td) {
  padding: 6px 7px;
  border-bottom: 1px solid #dce2d6;
}
.exampleOutput {
  margin-top: 12px;
}
.exampleOutput img {
  width: min(100%, 310px);
  height: auto;
  display: block;
  border-radius: 5px;
}
@media (max-width: 670px) {
  .homeUpload {
    grid-template-columns: 1fr;
  }
  .homeIntro {
    margin-block-end: 13px;
  }
  .homeIntro p {
    font-size: 0.94rem;
  }
}
@media print {
  .homeIntro,
  .homeExample {
    display: none !important;
  }
}
.uploadCardHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-end: 10px;
}
.uploadCardHead h2 {
  margin: 0;
}
.uploadCardHead button {
  padding: 0.5rem 0.7rem;
}
#photoStatus {
  font-size: 14px;
  color: #385a43;
}
.uploadCard small {
  color: #44594b;
}
