:root {
  color-scheme: light;
  --paper: #f8f4ea;
  --cream: #fffaf1;
  --ink: #2f3127;
  --muted: #5f6052;
  --line: #dcd4c3;
  --rust: #98432e;
  --rust-dark: #773421;
  --sage: #e3e8d7;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .2em; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font: normal 2rem/1.08 var(--serif); letter-spacing: -.038em; }
p { color: var(--muted); }
img { max-width: 100%; display: block; }
.wrap { width: min(1200px, 100% - 80px); margin-inline: auto; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 3; transform: translateY(-150%); padding: .5rem 1rem; background: var(--cream); }
.skip:focus { transform: none; }
.site-head { border-bottom: 1px solid var(--line); }
.head { min-height: 80px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font: bold 1.7rem/1 var(--serif); letter-spacing: -.055em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; flex: none; color: #fff7e7; border-radius: 50%; background: var(--rust); font: 1.45rem/1 var(--serif); }
nav { display: flex; gap: 24px; white-space: nowrap; }
nav a { text-decoration: none; font-size: .9rem; font-weight: 650; }
nav a:hover { text-decoration: underline; }
.search { display: flex; gap: 8px; align-items: center; margin-inline-start: auto; min-width: 0; }
.search input { width: clamp(135px, 19vw, 270px); min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--cream); color: var(--ink); font-size: .9rem; }
.search button { border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); padding: 8px 12px; font-weight: 650; font-size: .9rem; }
.search button:hover { background: var(--sage); }
.hero { display: grid; grid-template-columns: .93fr 1.07fr; min-height: 430px; overflow: hidden; border: 1px solid #e4d4bd; border-radius: 22px; margin: 34px 0 42px; background: #f1e5cf; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(30px, 5vw, 74px); }
.kicker { color: var(--rust-dark); font-size: .83rem; line-height: 1.35; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.hero h1, .intro h1 { font-size: clamp(3rem, 6vw, 5.6rem); margin: .16em 0 .18em; }
.hero p:not(.kicker) { max-width: 35ch; margin-bottom: 24px; color: #525144; font-size: 1.04rem; }
.hero-image { position: relative; min-height: 330px; margin: 0; background: #b08660; }
.hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-image figcaption { position: absolute; bottom: 16px; right: 16px; padding: 6px 12px; border-radius: 6px; background: var(--cream); font-size: .88rem; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rust); border-radius: 8px; padding: 9px 16px; text-decoration: none; color: white; background: var(--rust); font-weight: 650; }
.button:hover { background: var(--rust-dark); }
.categories { padding: 0 0 31px; scroll-margin-top: 20px; }
.categories h2 { font-size: 2rem; margin-bottom: 16px; }
.category-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { text-decoration: none; display: inline-flex; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; font-weight: 650; font-size: .9rem; background: var(--cream); }
.chip:hover { background: var(--sage); }
.chip[aria-current=true] { color: #fff; border-color: var(--ink); background: var(--ink); }
.gallery { border-top: 1px solid var(--line); padding: 25px 0 53px; scroll-margin-top: 20px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(2.35rem, 4.1vw, 3.5rem); }
.section-head p { margin-top: 5px; font-size: .91rem; }
.filter { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.filter select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--cream); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { text-decoration: none; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--cream); }
.card:hover h3 { text-decoration: underline; text-underline-offset: .15em; }
.card img { width: 100%; aspect-ratio: 1.52; object-fit: cover; background: #e3d4bd; }
.card-copy { padding: 15px 16px 18px; }
.card h3 { font-size: clamp(1.45rem, 2vw, 2rem); margin: 6px 0 10px; }
.card .kicker { font-size: .76rem; }
.meta { color: var(--muted); font-size: .92rem; }
.site-foot { border-top: 1px solid var(--line); }
.foot { padding-block: 23px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.foot .brand { font-size: 1.3rem; }
.foot p { font-size: .9rem; }
.breadcrumb { padding: 24px 0 15px; font-size: .9rem; color: var(--muted); }
.intro { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(25px, 5vw, 65px); padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.intro h1 { font-size: clamp(2.8rem, 5.4vw, 5.2rem); }
.intro p:not(.kicker) { margin: 10px 0 15px; max-width: 43ch; }
.intro img { width: 100%; aspect-ratio: 1.45; object-fit: cover; border-radius: 17px; }
.jumps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tutorial { display: grid; grid-template-columns: minmax(235px, .72fr) minmax(0, 1.65fr); align-items: start; gap: clamp(22px, 5vw, 62px); padding: 35px 0 48px; }
.tutorial h2 { margin: 0 0 12px; font-size: clamp(2rem, 3vw, 2.8rem); }
#materials, #steps { scroll-margin-top: 20px; }
.materials { background: var(--sage); border: 1px solid #cbd2b9; border-radius: 13px; padding: 23px; }
.materials ul { list-style: none; padding: 0; margin: 9px 0 18px; }
.materials li { border-bottom: 1px solid #cbd2b9; }
.materials label { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; cursor: pointer; }
.materials input { width: 16px; height: 16px; flex: none; accent-color: #516344; }
.materials input:checked + span { text-decoration: line-through; color: var(--muted); }
.materials p { font-size: .9rem; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: steps; }
.steps li { counter-increment: steps; position: relative; padding: 18px 0 18px 54px; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(steps); position: absolute; left: 0; top: 18px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #efdfcd; color: var(--rust-dark); font-weight: bold; }
.steps h3 { margin: 0 0 7px; font-size: 1.55rem; }
.steps img { border-radius: 10px; width: 100%; max-height: 310px; object-fit: cover; margin-top: 15px; }
.variations { border-left: 3px solid var(--rust); margin-top: 24px; padding: 9px 16px; }
.variations summary { font-weight: 700; cursor: pointer; }
.variations p { padding: 6px 0; }
.related { border-top: 1px solid var(--line); padding: 25px 0 46px; }
.related h2 { margin-bottom: 15px; }
.related ul { margin: 0; padding-left: 20px; }
@media (max-width: 900px) {
  .wrap { width: min(1200px, 100% - 44px); }
  .head { gap: 18px; }
  nav { gap: 14px; }
  .hero-copy { padding: 32px; }
  .hero { min-height: 370px; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .head { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding-block: 14px; }
  .brand { font-size: 1.4rem; gap: 7px; }
  .brand-mark { width: 28px; height: 28px; font-size: 1.15rem; }
  nav { gap: 12px; }
  nav a { font-size: .85rem; }
  .search { grid-column: 1 / -1; margin: 0; }
  .search input { flex: 1; width: auto; font-size: 1rem; }
  .hero { grid-template-columns: 1fr; margin: 22px 0 26px; min-height: 0; border-radius: 15px; }
  .hero-copy { padding: 25px; }
  .hero h1, .intro h1 { font-size: clamp(2.65rem, 12vw, 4.6rem); }
  .hero-image { min-height: 0; aspect-ratio: 1.58; }
  .hero p:not(.kicker) { margin-bottom: 17px; }
  .categories { padding-bottom: 22px; }
  .gallery { padding-top: 20px; }
  .grid, .intro, .tutorial { grid-template-columns: 1fr; }
  .grid { gap: 13px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .intro { gap: 20px; padding-bottom: 20px; }
  .tutorial { padding-top: 20px; }
  .foot { align-items: flex-start; }
}
@media (max-width: 370px) {
  .head { grid-template-columns: 1fr; }
}

/* Public site and editor */
.skip { position: absolute; }
.hero-image img { object-position: center; }
.no-photo { display: grid; place-items: center; background: var(--sage); color: var(--muted); aspect-ratio: 1.52; }
.hero-image.no-photo { aspect-ratio: auto; }
.hero h1 { overflow-wrap: anywhere; }
.gallery > .section-head:first-child { align-items: start; }
.pages { margin: 24px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.catalogue { padding-top: 28px; min-height: 63vh; }
.catalogue .categories { padding-bottom: 24px; }
.filters-form { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.filters-form input, .filters-form select, .editor input:not([type=checkbox]), .editor textarea, .editor select {
  width: 100%; color: var(--ink); background: var(--cream); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px;
}
.filters-form input { width: min(160px, 100%); }
.filters-form select { width: auto; }
.filters-form label { display: grid; color: var(--muted); font-size: .89rem; }
.secondary { border: 1px solid var(--line); border-radius: 7px; background: var(--cream); color: var(--ink); padding: 7px 11px; text-decoration: none; font-weight: 650; }
.secondary:hover { background: var(--sage); }
.editor { padding-block: 28px 55px; }
.editor h1 { font-size: clamp(2.35rem, 5vw, 3.8rem); margin-bottom: 14px; }
.editor h2 { margin-bottom: 12px; }
.admin-actions { margin-bottom: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.admin-actions form { margin: 0; }
.editor .panel { background: var(--cream); border: 1px solid var(--line); border-radius: 13px; padding: clamp(15px, 3vw, 26px); margin: 18px 0; }
.editor .login { max-width: 520px; }
.editor label { display: grid; gap: 4px; margin: 9px 0; }
.editor label.check { display: flex; align-items: center; }
.editor label span, .editor legend { font-weight: 650; }
.editor textarea { min-height: 90px; resize: vertical; }
.editor input[type=file] { max-width: 100%; }
.editor input[type=file]::file-selector-button { font: inherit; }
.editor input[type=checkbox] { accent-color: var(--rust); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 0 14px; }
.editor .hint { font-size: .9rem; margin-bottom: 8px; }
.editor .notice { padding: 10px 14px; border: 1px solid #ad6a57; border-radius: 8px; background: #fae9dc; margin-bottom: 12px; }
.editor .success { border-color: #98a783; background: var(--sage); }
.editor .list { list-style: none; padding-left: 0; }
.editor .list li { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.editor fieldset.step { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; min-width: 0; }
.editor .preview-photo { max-width: min(230px, 100%); max-height: 150px; border-radius: 8px; object-fit: contain; }
.step-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.form-footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag { padding: 3px 8px; border-radius: 99px; background: var(--sage); font-size: .84rem; font-weight: 650; }
.draft-bar { margin: 18px 0 0; padding: 10px 14px; background: var(--sage); border-radius: 8px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
@media (max-width: 680px) {
  .hero-image.no-photo { aspect-ratio: 1.58; }
  .filters-form { align-items: end; }
}
