.wf-archive {
  --archive-border: #dce3da;
  --archive-muted: #53675d;
  background: #f6f6ef;
}

.wf-archive::before { content: none; }

.wf-archive [hidden] { display: none !important; }

.archive-shell {
  width: min(100% - 64px, 1232px);
  margin-inline: auto;
}

.archive-hero {
  color: #fffef7;
  background: var(--green);
  background-image: linear-gradient(90deg, #123b30 23%, #174638ed 49%, #17463850 100%),
    url('/assets/culture/01-village.webp');
  background-position: center, right 43%;
  background-size: cover, min(72%, 1250px) auto;
  background-repeat: no-repeat;
  border-bottom: 3px solid #c7ad72;
}

.archive-nav {
  min-height: 65px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f8f4e934;
}

.archive-brand,
.archive-return {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  font-weight: 650;
}

.archive-seal {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  border-radius: 9px;
  background: #f7efd9;
  color: var(--green);
  font-family: var(--serif);
  font-size: 1.3rem;
}

.archive-return {
  min-height: 38px;
  padding: 4px 14px;
  border-radius: 99px;
  background: #fbf6e8;
  color: var(--green);
  white-space: nowrap;
}

.archive-return:hover { background: #f0e2bd; }

.archive-heading { padding: 35px 0 37px; }

.archive-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.4vw, 3.25rem);
  line-height: 1.3;
  letter-spacing: .045em;
}

.archive-heading p {
  margin: 10px 0 0;
  color: #f4e3bb;
  font-size: clamp(.82rem, 2.1vw, .99rem);
}

.archive-main { padding-block: 25px 56px; }

.archive-search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 53px;
  padding-inline: 17px 11px;
  background: #fffefb;
  border: 1px solid var(--archive-border);
  border-radius: 11px;
}

.archive-search:focus-within {
  outline: 2px solid #4f7861;
  outline-offset: 2px;
}

.archive-magnifier {
  position: relative;
  flex: 0 0 14px;
  margin-right: 4px;
  width: 14px;
  height: 14px;
  border: 1.7px solid #587264;
  border-radius: 50%;
}

.archive-magnifier::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 1.7px;
  background: #587264;
  transform: rotate(45deg);
  top: 11px;
  left: 10px;
}

.archive-search input {
  flex: 1 1 0;
  width: 0;
  min-height: 50px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.archive-search input::placeholder { color: #64756b; }

.archive-search input::-webkit-search-cancel-button { display: none; }

.archive-search-clear {
  min-height: 36px;
  padding: 0 8px;
  background: transparent;
  border: 0;
  color: var(--green);
  cursor: pointer;
}

.archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 14px 17px;
}

.archive-pill {
  min-height: 39px;
  padding: 4px 15px;
  border: 1px solid var(--archive-border);
  border-radius: 99px;
  background: #fffefb;
  color: var(--green);
  font-size: .88rem;
  cursor: pointer;
}

.archive-pill:hover { border-color: #718e7f; }

.archive-pill[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.archive-count {
  margin: 0 0 11px;
  color: var(--archive-muted);
  font-size: .86rem;
  font-variant-numeric: tabular-nums;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--archive-border);
  border-radius: 13px;
  background: #fffefb;
  box-shadow: 0 4px 13px #183f3010;
  transition: transform .18s ease, box-shadow .18s ease;
}

@media (hover: hover) {
  .archive-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px #183f3023;
  }
}

.archive-card:focus-within {
  outline: 2px solid #49725d;
  outline-offset: 2px;
}

.archive-card-media {
  position: relative;
  flex: none;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e7ede3;
}

.archive-card-media img,
.archive-no-photo {
  display: block;
  width: 100%;
  height: 100%;
}

.archive-card-media img,
.archive-card-media .archive-no-photo {
  position: absolute;
  inset: 0;
  min-height: 0;
}

.archive-card-media img { object-fit: cover; }

.archive-no-photo {
  display: grid;
  min-height: 125px;
  place-items: center;
  color: var(--archive-muted);
  background: repeating-linear-gradient(130deg, #e7ede3 0 14px, #edf1e8 14px 28px);
  font-size: .85rem;
}

.archive-category {
  position: absolute;
  inset: 10px auto auto 10px;
  padding: 3px 8px;
  border-radius: 5px;
  background: #fffef6f2;
  color: var(--green);
  font-size: .73rem;
  font-weight: 650;
}

.archive-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 13px 14px 0;
}

.archive-card-title {
  margin: 0;
  color: var(--green-deep);
  font-size: 1rem;
  line-height: 1.45;
}

.archive-card-summary {
  margin: 6px 0 13px;
  color: var(--archive-muted);
  font-size: .86rem;
  line-height: 1.68;
}

.archive-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  border-top: 1px solid #e8ece4;
  font-size: .77rem;
}

.archive-number {
  color: var(--archive-muted);
  font-variant-numeric: tabular-nums;
}

.archive-open {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-weight: 650;
}

.archive-open::after {
  content: "";
  position: absolute;
  inset: 0;
}

.archive-open span { margin-left: 2px; }

.archive-empty {
  padding: 32px 16px;
  border: 1px dashed #a9baad;
  border-radius: 13px;
  text-align: center;
  color: var(--archive-muted);
}

.archive-empty p { margin: 0 0 12px; }

.archive-dialog {
  width: min(720px, calc(100% - 24px));
  max-height: min(87vh, 860px);
  max-height: min(87dvh, 860px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--archive-border);
  border-radius: 15px;
  background: #fffefb;
  color: var(--ink);
  box-shadow: 0 24px 80px #0b2c2250;
}

.wf-archive:has(.archive-dialog[open]) { overflow: hidden; }
.archive-dialog::backdrop { background: #0c231cc4; }

.archive-dialog-inner {
  position: relative;
  display: flow-root;
}

.archive-close {
  position: sticky;
  z-index: 1;
  top: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 12px 12px -54px auto;
  padding: 0;
  border: 1px solid var(--archive-border);
  border-radius: 50%;
  background: #fffefb;
  color: var(--green-deep);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.archive-figure { margin: 0; }

.archive-dialog-media {
  display: grid;
  place-items: center;
  min-height: 148px;
  background: #e7ede3;
}

.archive-dialog-media img {
  width: 100%;
  height: auto;
  max-height: 46vh;
  object-fit: contain;
}

.archive-figure figcaption {
  padding: 7px clamp(16px, 4vw, 30px) 0;
  color: var(--archive-muted);
  font-size: .77rem;
}

.archive-figure figcaption:empty { display: none; }

.archive-detail { padding: 17px clamp(16px, 4vw, 30px) 26px; }

.archive-detail-meta {
  margin: 0 0 3px;
  color: var(--archive-muted);
  font-size: .8rem;
}

.archive-detail h2 {
  margin: 0;
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: clamp(1.34rem, 4vw, 2rem);
  line-height: 1.4;
}

.archive-detail h3 {
  margin: 15px 0 4px;
  color: var(--green-deep);
  font-size: .97rem;
}

.archive-detail h3 small {
  margin-left: 4px;
  color: var(--archive-muted);
  font-size: .75rem;
  font-weight: normal;
}

.archive-detail-text, .archive-detail-value {
  margin: 0;
  color: #344a40;
  font-size: .92rem;
}

.archive-detail-note {
  margin: 9px 0 0;
  padding: 7px 10px;
  border-left: 2px solid #b19050;
  background: #f8f3e6;
  color: #4a4739;
  font-size: .85rem;
}

.archive-source-list {
  margin: 0;
  padding-left: 1.25em;
  font-size: .85rem;
}

.archive-detail a, .archive-figure a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: .18em;
  overflow-wrap: anywhere;
}

.archive-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .archive-shell { width: calc(100% - 32px); }
  .archive-hero {
    background-image: linear-gradient(90deg, #123b30f5 13%, #174638bf 100%),
      url('/assets/culture/01-village.webp');
    background-position: center;
    background-size: cover;
  }
  .archive-heading { padding-block: 27px; }
  .archive-main { padding-top: 17px; }
  .archive-pill { min-height: 38px; padding-inline: 11px; font-size: .82rem; }
  .archive-grid { gap: 12px; }
}

@media (max-width: 510px) {
  .archive-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .archive-card { transition: none; }
  .archive-card:hover { transform: none; }
}

.archive-feature {
  display: flex; align-items: center; gap: clamp(12px, 2.5vw, 24px);
  padding: .65rem clamp(.65rem, 2vw, 1rem); margin-bottom: 1rem;
  background: #edf3e8; border: 1px solid #d5dfd3; border-radius: 13px; color: var(--green-deep);
}
.archive-feature img { width: clamp(64px, 14vw, 155px); height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; }
.archive-feature div { flex: 1; }
.archive-feature strong, .archive-feature div span { display: block; }
.archive-feature div span { font-size: .85rem; color: var(--archive-muted); }
.archive-feature:hover strong { text-decoration: underline; }
.archive-selects { display: flex; flex-wrap: wrap; gap: .6rem 1rem; padding-top: .75rem; }
.archive-selects label { display: flex; align-items: center; gap: .5rem; color: var(--green); font-size: .88rem; font-weight: 650; }
.archive-selects select { min-height: 38px; min-width: 100px; max-width: 100%; padding-inline: .45rem; border: 1px solid #afbfb0; border-radius: 8px; background: #fffefb; color: var(--green); font: inherit; }
.archive-location { margin: .26rem 0 0; color: #665324; font-size: .77rem; }
.archive-card-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.food-archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.food-archive-grid .archive-card { min-width: 0; padding-bottom: .8rem; }
.food-archive-grid .archive-card a { color: var(--green); text-decoration: underline; line-height: 1.5; }
.food-archive-grid .archive-card-summary { -webkit-line-clamp: initial; }
.food-archive-grid .archive-card-body small { margin-bottom: .5rem; color: var(--archive-muted); }
@media (max-width: 840px) { .food-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 510px) { .food-archive-grid { grid-template-columns: 1fr; } }

/* Regional archive covers are editorial title cards, not substitute photographs. */
.archive-culture-cover{height:100%;min-height:210px;display:flex;flex-direction:column;justify-content:center;padding:32px;gap:18px;background:radial-gradient(ellipse at 90% 20%,#dccba74d 0,transparent 55%),#194b3d;color:#f4ead6;position:relative;overflow:hidden}.archive-culture-cover:after{content:"";position:absolute;inset:18px;border:1px solid #ddcda52e;border-radius:50% 50% 10% 10%;pointer-events:none}.archive-culture-cover>span{font-size:.78rem;letter-spacing:.16em}.archive-culture-cover strong{font-family:Georgia,serif;font-size:2.1rem;font-weight:400;letter-spacing:.09em;z-index:1;overflow-wrap:anywhere}.archive-culture-cover small{font-size:.72rem;opacity:.72}.archive-culture-cover--1{background:radial-gradient(ellipse at 80% 10%,#cb946050 0,transparent 60%),#77533b}.archive-culture-cover--2{background:radial-gradient(ellipse at 90% 20%,#fcf0c566 0,transparent 65%),#e5d9bb;color:#314c42}.archive-dialog-media>.archive-culture-cover{min-height:280px}.archive-dialog-media>.archive-culture-cover strong{font-size:3rem}
