:root {
  --ink: #24302d;
  --muted: #65716d;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --rail: #313b37;
  --line: #d8ddd4;
  --accent: #a53d2c;
  --accent-dark: #7d2e24;
  --green: #426553;
  --gold: #c79445;
  --shadow: 0 18px 45px rgba(36, 48, 45, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #fff 0%, var(--paper) 46%, #f5f7f3 100%);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.58;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

main { flex: 1; min-width: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; z-index: 100; top: 8px; left: 16px; padding: 10px 16px; background: #fff; color: var(--green); }

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand account" "navigation navigation";
  align-items: center;
  gap: 18px 20px;
  padding: 20px 0 18px;
}

.brand {
  grid-area: brand;
  justify-self: start;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-waveform {
  flex: 0 0 auto;
  width: 38px;
  height: 30px;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-width: 3.2;
}

.brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

.site-nav {
  grid-area: navigation;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  border-radius: var(--radius);
  color: var(--rail);
  font-size: 0.96rem;
  font-weight: 700;
  padding: 9px 13px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: #eaf0e6;
  color: var(--green);
}

.account-nav {
  grid-area: account;
  justify-self: end;
  align-self: start;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-nav .nav-account-action {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 6px;
  min-height: 34px;
  border: 1px solid rgba(66, 101, 83, 0.24);
  background: #fff;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 800;
  padding: 5px 10px;
}

.account-nav .nav-account-action:hover,
.account-nav .nav-account-action[aria-current="page"] {
  border-color: rgba(165, 61, 44, 0.36);
  background: #fff8ef;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

h1 {
  font-size: 2.65rem;
  letter-spacing: 0;
}

h2 {
  font-size: 1.8rem;
}

.archive-intro p,
.page-intro p,
.section-heading p {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 760px;
}

.archive-intro {
  max-width: 860px;
  padding: 24px 0 18px;
}

.site-subtitle {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
}

.archive-intro h1 {
  margin-bottom: 12px;
}

.archive-intro p:last-child {
  margin: 0;
}

.search-panel {
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid rgba(66, 101, 83, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(36, 48, 45, 0.09);
}

.home-search {
  margin-bottom: 12px;
}

.search-panel-compact {
  margin-top: 12px;
}

.message-stack {
  display: grid;
  gap: 10px;
  margin: 12px 0 18px;
}

.message {
  margin: 0;
  border: 1px solid rgba(66, 101, 83, 0.2);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  padding: 12px 14px;
}

.message-success {
  border-color: rgba(66, 101, 83, 0.32);
  background: #edf5ea;
  color: var(--green);
}

.message-warning,
.message-error {
  border-color: rgba(165, 61, 44, 0.3);
  background: #fff4ec;
  color: var(--accent-dark);
}

.archive-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 240px) auto;
  gap: 12px;
  align-items: end;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  display: block;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

input,
select,
button,
.button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
}

input[type="checkbox"] {
  width: auto;
  min-height: 0;
}

input:focus,
select:focus {
  border-color: var(--green);
  outline: 3px solid rgba(66, 101, 83, 0.16);
}

.search-suggest {
  position: relative;
  display: block;
}

.search-suggest-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(420px, 70vh);
  overflow-y: auto;
  border: 1px solid rgba(66, 101, 83, 0.22);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 42px rgba(36, 48, 45, 0.16);
}

.search-suggest-menu[hidden] {
  display: none;
}

.search-suggest-item {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(216, 221, 212, 0.9);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 12px 14px;
  text-align: left;
}

.search-suggest-item:last-child {
  border-bottom: 0;
}

.search-suggest-item:hover,
.search-suggest-item:focus,
.search-suggest-item[aria-selected="true"] {
  background: #f4f8f1;
  outline: none;
}

.search-suggest-item strong,
.search-suggest-item span,
.search-suggest-empty {
  display: block;
}

.search-suggest-item strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
}

.search-suggest-meta {
  margin-top: 4px;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
}

.search-suggest-notes {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.search-suggest-empty {
  color: var(--muted);
  padding: 13px 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  padding: 12px 18px;
  text-decoration: none;
  text-align: center;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  border-color: rgba(66, 101, 83, 0.28);
  background: #fff;
  color: var(--green);
}

.button-secondary.is-following,
.follow-button.is-following {
  border-color: rgba(66, 101, 83, 0.34);
  background: #edf3ea;
}

.button-small {
  min-height: 42px;
  padding: 9px 14px;
}

.download-icon {
  flex: 0 0 auto;
  width: 1.18em;
  height: 1.18em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  color: white;
}

.search-button-icon {
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.section,
.page-intro,
.detail,
.cms-page {
  padding: 28px 0 62px;
}

.series-section {
  padding-top: 28px;
}

.section-heading {
  margin-bottom: 18px;
  max-width: 760px;
}

.section-heading h2 {
  margin-bottom: 8px;
}

.search-helper {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.series-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.series-card,
.project-card,
.empty-results,
.metadata,
.notes-panel {
  border: 1px solid rgba(66, 101, 83, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(36, 48, 45, 0.07);
}

.series-card {
  display: flex;
  flex-direction: column;
  min-height: 245px;
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
}

.series-card:hover {
  border-color: rgba(165, 61, 44, 0.45);
  transform: translateY(-2px);
}

.series-card-title,
.series-label {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.series-card p {
  flex: 1;
  color: var(--muted);
}

.series-card-title { font-size: 1.3rem; text-transform: none; }
.series-card .series-count { margin-top: 8px; color: var(--muted); font-size: .9rem; }
.archive-credit { padding: 0 0 32px; color: var(--muted); font-size: .96rem; }
.archive-credit a, .browse-link { color: var(--green); font-weight: 700; }
.browse-link { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 10px; }

.archive-list-page .site-header { padding-bottom: 12px; gap: 12px 20px; }
.archive-list-intro { padding: 18px 0 14px; }
.archive-list-intro p { margin: 10px 0 0; }
.archive-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 20px; }
.archive-title-row .browse-link { margin: 0; }
.archive-list-page .search-panel-compact { margin-top: 0; margin-bottom: 16px; }

.series-card small {
  display: block;
  color: var(--green);
  font-weight: 700;
}

.series-card-action {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
  border: 1px solid rgba(66, 101, 83, 0.28);
  border-radius: var(--radius);
  color: var(--green);
  font-size: 0.94rem;
  padding: 10px 12px;
}

.series-filter {
  margin: 16px 0 22px;
}

.series-filter h2 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.series-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.series-filter-link {
  border: 1px solid rgba(66, 101, 83, 0.22);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green);
  font-weight: 800;
  padding: 8px 12px;
  text-decoration: none;
}

.series-filter-link:hover,
.series-filter-link.is-active {
  background: #eaf0e6;
  border-color: rgba(66, 101, 83, 0.34);
}

.category-browser {
  margin: 24px 0 26px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  border: 1px solid rgba(66, 101, 83, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 16px;
  text-decoration: none;
}

.category-card:hover,
.category-card.is-active {
  border-color: rgba(165, 61, 44, 0.42);
  background: #fff;
}

.category-card strong {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.category-card span {
  margin-top: 6px;
  color: var(--green);
  font-weight: 800;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.filter-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0 14px;
  border: 1px solid rgba(66, 101, 83, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  padding: 16px 18px;
}

.filter-context h2 {
  margin-bottom: 6px;
  font-size: 1.32rem;
}

.filter-context-compact {
  align-items: center;
  margin: 14px 0 10px;
  padding: 10px 12px;
}

.filter-context-compact > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.filter-context-compact h2 {
  margin: 0;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-context-compact .context-actions {
  margin: 0;
}

.filter-context p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.filter-context p span {
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid rgba(66, 101, 83, 0.18);
  border-radius: var(--radius);
  background: #fff;
  padding: 5px 8px;
}

.context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.context-actions a {
  color: var(--green);
  font-weight: 900;
}

.results-heading {
  margin: 20px 0 0;
  font-size: 1.28rem;
}

#results {
  scroll-margin-top: 24px;
}

#results:focus { outline: none; }

.credit-note {
  margin: 20px 0 76px;
  padding: 22px 26px;
  border-left: 5px solid var(--gold);
  background: #fff9ed;
  color: #59452a;
}

.page-intro {
  padding-bottom: 10px;
}

.account-form,
.account-status-panel {
  border: 1px solid rgba(66, 101, 83, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(36, 48, 45, 0.07);
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 560px;
  gap: 18px;
  margin: 28px auto 48px;
}

.auth-panel .account-form { padding: 0; border: 0; background: transparent; box-shadow: none; }

.auth-panel-narrow {
  max-width: 560px;
  grid-template-columns: 1fr;
}

.auth-copy p {
  color: var(--muted);
  font-size: 1.08rem;
}

.account-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.account-form-wide {
  max-width: 720px;
  margin: 20px 0 68px;
}

.account-form .errorlist,
.member-fields .errorlist {
  margin: 6px 0 0;
  color: var(--accent-dark);
  font-size: 0.92rem;
  padding-left: 20px;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.checkbox-field input {
  margin-top: 6px;
}

.form-footnote {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.form-footnote a {
  color: var(--green);
  font-weight: 700;
}

.password-control { position: relative; display: block; min-width: 0; }
.password-control.has-password-toggle input { padding-right: 58px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.password-toggle:hover { background: #edf3ea; }
.password-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.password-toggle img { display: block; width: 20px; height: 20px; }
.password-toggle[hidden], .password-toggle img[hidden] { display: none; }

.account-status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
  padding: 18px;
}

.account-status-panel h2 {
  font-size: 1.25rem;
}

.account-status-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.account-status-panel-ok {
  background: #f4faf1;
}

.account-section {
  max-width: 820px;
  margin: 22px 0 68px;
}

.account-section + .account-section {
  margin-top: -42px;
}

.follow-list {
  display: grid;
  gap: 10px;
}

.follow-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(66, 101, 83, 0.18);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px 14px;
}

.follow-list-item strong,
.follow-list-item span {
  display: block;
}

.follow-list-item span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.follow-form {
  display: inline-flex;
}

.favorite-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.favorite-button { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 10px; background: transparent; border: 1px solid transparent; border-radius: 6px; color: #68766e; cursor: pointer; text-decoration: none; }
.favorite-button:hover { background: #edf1ed; border-color: #d9e1d9; }
.favorite-button.is-favorite { color: #a53d2c; }
.favorite-button.is-favorite .favorite-icon { fill: currentColor; }
.favorite-button:focus-visible { outline: 2px solid #426553; outline-offset: 2px; }
.favorite-button:disabled { opacity: .55; cursor: wait; }
.favorite-icon { width: 24px; height: 24px; flex: 0 0 24px; }
.favorite-error { color: #a53d2c; font-size: .85rem; max-width: 22ch; }
.card-actions:has(.favorite-form), .card-actions:has(.favorite-button) { flex-direction: row; align-items: center; }

.follow-button {
  white-space: nowrap;
}

.account-danger-zone {
  border-top: 1px solid rgba(165, 61, 44, 0.18);
  padding-top: 22px;
}

.page-intro-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.page-intro-actions > div {
  min-width: 0;
}

.page-intro-actions .button {
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.browse-overview {
  margin: 20px 0 24px;
}

.overview-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.overview-link-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(66, 101, 83, 0.2);
  border-radius: var(--radius);
  background: #f7faf5;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 900;
  padding: 8px 10px;
  text-align: center;
  text-decoration: none;
}

.overview-link-grid a:hover {
  border-color: rgba(165, 61, 44, 0.42);
  background: #fff;
  color: var(--accent);
}

.tag-overview {
  display: grid;
  gap: 26px;
  margin: 26px 0;
}

.tag-overview-group {
  border-top: 1px solid rgba(66, 101, 83, 0.16);
  padding-top: 22px;
  scroll-margin-top: 24px;
}

.topic-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  border: 1px solid rgba(66, 101, 83, 0.2);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  text-decoration: none;
}

.topic-pill:hover {
  border-color: rgba(165, 61, 44, 0.42);
  background: #fffaf2;
}

.topic-pill strong {
  color: var(--green);
  font-weight: 900;
}

.topic-pill span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.empty-inline {
  border: 1px dashed rgba(66, 101, 83, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  padding: 12px 14px;
}

.empty-inline p {
  margin: 0;
}

.newest-projects {
  margin-top: 28px;
}

.notice {
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid #e5cf9f;
  border-radius: var(--radius);
  background: #fff7e7;
  color: #5b4324;
}

.notice p {
  margin: 0;
}

.notice p + p {
  margin-top: 8px;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 14px;
  border-top: 1px solid rgba(66, 101, 83, 0.16);
  padding-top: 14px;
}

.results-toolbar p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-weight: 600;
}

.results-toolbar a {
  display: inline-block;
  margin-top: 4px;
  color: var(--green);
  font-weight: 800;
}

.sort-form {
  flex-shrink: 0;
}

.sort-form .field { flex-direction: row; align-items: center; gap: 10px; }
.sort-form select { width: 180px; min-height: 44px; }

.project-grid {
  grid-template-columns: 1fr;
  margin-bottom: 62px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-height: auto;
  padding: 22px 24px;
}

.project-card h2 {
  margin-top: 8px;
  font-size: 1.42rem;
}

.project-card h2 a { text-decoration: none; }
.project-card h2 a:hover { text-decoration: underline; color: var(--green); }

.project-summary-text { min-width: 0; }
.project-summary-with-photo {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}
.project-summary-with-photo .project-summary-text { grid-column: 2; grid-row: 1; }
.project-summary-with-photo .reference-photo { grid-column: 1; grid-row: 1; }
.reference-photo { margin: 0; min-width: 0; max-width: 360px; }
.detail > .reference-photo { width: 100%; max-width: none; margin-top: 26px; }
.detail > .reference-photo .reference-photo-link { width: 100%; }
.detail > .reference-photo .reference-photo-link > img { width: 100%; max-height: none; }
.reference-photo-link {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  color: var(--green);
  text-decoration: none;
}
.reference-photo-link > img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  background: #f1f4f2;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.reference-photo-link:hover > img { border-color: var(--green); }
.reference-photo-enlarge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 4px rgba(36, 48, 45, 0.12);
}
.reference-photo-enlarge img { display: block; width: 18px; height: 18px; }
.reference-photo figcaption {
  display: grid;
  gap: 3px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.reference-photo-compact { margin: 0; }
.reference-photo-compact .reference-photo-link { width: 100%; }
.reference-photo-compact .reference-photo-link > img { width: 100%; aspect-ratio: 3 / 2; }
.photo-viewer-open { overflow: hidden; }
.photo-viewer {
  width: min(1200px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.photo-viewer::backdrop { background: rgba(15, 23, 19, 0.8); }
.photo-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.photo-viewer-header h2 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.photo-viewer-actions { display: flex; flex-shrink: 0; gap: 8px; }
.photo-viewer-actions .button { width: auto; min-height: 44px; white-space: nowrap; }
.photo-viewer-actions [data-photo-zoom] { min-width: 116px; }
.photo-viewer-stage {
  overflow: auto;
  height: min(65dvh, 760px);
  background: #edf1ee;
}
.photo-viewer-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.photo-viewer.is-enlarged .photo-viewer-stage img { width: auto; height: auto; max-width: none; }
.photo-viewer-description { margin: 12px 0 0; overflow-wrap: anywhere; }

.project-card-compact h2 {
  font-size: 1.2rem;
}

.project-card p {
  color: var(--muted);
}

.record-notes {
  max-width: 880px;
  margin-top: 16px;
  border-left: 4px solid rgba(199, 148, 69, 0.74);
  background: #fffdf7;
  color: var(--muted);
  padding: 12px 14px;
}

.record-notes h3 {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
}

.record-notes div {
  overflow-wrap: anywhere;
  white-space: normal;
}

.record-notes.can-collapse:not(.is-expanded) .record-notes-body { max-height: var(--notes-preview-height); overflow: hidden; }
.notes-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 4px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.notes-toggle[hidden] { display: none; }
.notes-toggle img { width: 16px; height: 16px; }
.is-expanded .notes-toggle img { transform: rotate(180deg); }

.audio-preview {
  max-width: 640px;
  margin-top: 16px;
  border: 1px solid rgba(66, 101, 83, 0.18);
  border-radius: var(--radius);
  background: #f7faf5;
  padding: 12px 14px 14px;
}

.audio-preview h3 {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.audio-preview-player {
  display: block;
  width: 100%;
  max-width: 100%;
}

.record-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 10px 0 0;
  color: var(--green);
  font-size: 0.96rem;
  font-weight: 600;
}

.record-metadata span {
  overflow-wrap: anywhere;
}

.record-metadata span:not(:last-child)::after {
  content: "·";
  margin: 0 8px;
  color: var(--muted);
}

.tag-label {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}
.tag-label + .tag-row { margin-top: 4px; }

.tag-row span,
.tag-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid rgba(66, 101, 83, 0.2);
  border-radius: 999px;
  background: #edf3ea;
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 4px 10px;
  text-decoration: none;
}

.tag-row a:hover { border-color: var(--green); text-decoration: underline; }

.card-actions {
  display: flex;
  align-self: end;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-top: 0;
}

.card-actions .button {
  white-space: nowrap;
}
.card-actions .favorite-error { overflow-wrap: anywhere; }

.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.empty {
  color: var(--muted);
}

.empty-results {
  grid-column: 1 / -1;
  padding: 30px;
}

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--green);
  font-weight: 800;
}

.detail-header {
  max-width: 100%;
}

.detail-actions .detail-download {
  width: auto;
}

.metadata {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 30px 0;
  padding: 22px;
}

.metadata p {
  margin: 0;
}

.notes-panel {
  margin-top: 26px;
  padding: clamp(22px, 5vw, 42px);
}

.project-credit { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .96rem; }

.cms-page { padding: 24px 0 48px; }
.cms-page > h1 { margin-bottom: 18px; }
.rich-content pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.notes-panel h2 {
  margin-bottom: 18px;
}

.project-notes,
.cms-body {
  max-width: 860px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cms-body {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.58;
}

.rich-content h2,
.rich-content h3 {
  margin: 1.6rem 0 0.7rem;
  color: var(--ink);
}

.rich-content p,
.rich-content ul,
.rich-content ol,
.rich-content blockquote {
  margin: 0 0 1rem;
}

.rich-content [style*="font-size"] {
  font-size: inherit !important;
}

.rich-content a {
  color: var(--green);
  font-weight: 800;
}

.rich-content img {
  display: block;
  height: auto;
  margin: 1.4rem 0;
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(36, 48, 45, 0.12);
}

.rich-content figure {
  margin: 1.4rem 0;
}

.rich-content figcaption {
  color: var(--muted);
  font-size: 0.95rem;
}

.rich-content blockquote {
  border-left: 5px solid var(--gold);
  background: #fff9ed;
  color: #59452a;
  padding: 16px 18px;
}

.project-notes {
  white-space: normal;
}

.archive-search.knowledge-search {
  grid-template-columns: minmax(0, 1fr) auto;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  margin-block: 28px 44px;
}

.knowledge-topic-nav {
  position: sticky;
  top: 16px;
  border-inline-end: 1px solid var(--line);
  padding-inline-end: 16px;
}

.knowledge-topic-nav h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 1rem;
}

.knowledge-topic-nav ul,
.knowledge-article-list,
.knowledge-match-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.knowledge-topic-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 4px;
  color: var(--green);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.knowledge-topic-nav a span {
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.knowledge-topic-nav a:hover,
.knowledge-article-list a:hover {
  background: #edf1e9;
}

.knowledge-topic {
  margin-block-end: 34px;
  scroll-margin-block-start: 20px;
}

.knowledge-topic:last-child {
  margin-block-end: 0;
}

.knowledge-topic h2,
.knowledge-results h2,
.knowledge-related h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  line-height: 1.2;
}

.knowledge-article-list li {
  border-block-start: 1px solid var(--line);
}

.knowledge-article-list li:last-child {
  border-block-end: 1px solid var(--line);
}

.knowledge-article-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 14px;
  padding: 12px 10px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.knowledge-article-list a:hover strong {
  text-decoration: underline;
}

.knowledge-article-list strong {
  display: block;
  font-size: 1.08rem;
  color: var(--green);
  line-height: 1.35;
}

.knowledge-summary,
.knowledge-article-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}

.knowledge-article-list small {
  margin: 0 0 3px;
  font-weight: 600;
}

.knowledge-results {
  margin: 28px 0 44px;
  overflow-wrap: anywhere;
  scroll-margin-block-start: 12px;
}

.knowledge-result-count {
  margin: 0 0 12px;
  color: var(--muted);
}

.knowledge-section-heading,
.knowledge-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
}

.knowledge-section-heading {
  justify-content: space-between;
}

.knowledge-section-heading a,
.knowledge-crumbs a {
  color: var(--green);
  font-weight: 700;
}

.knowledge-matches {
  padding: 12px 16px;
  margin-block: 4px 18px;
  border-inline-start: 3px solid var(--gold);
  background: #f0f3ec;
}

.knowledge-matches h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.knowledge-match-list a {
  display: inline-block;
  padding-block: 5px;
  color: var(--green);
  font-weight: 600;
  line-height: 1.35;
}

.knowledge-crumbs {
  margin-block: 18px 22px;
  color: var(--muted);
}

.knowledge-answer-header h1 {
  margin: 0 0 22px;
  font-size: 2.45rem;
  line-height: 1.13;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.knowledge-answer {
  font-size: 1.14rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.knowledge-answer :is(h2, h3, h4) {
  margin: 1.4em 0 0.45em;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.25;
}

.knowledge-answer h2 { font-size: 1.4em; }
.knowledge-answer h3 { font-size: 1.2em; }
.knowledge-answer h4 { font-size: 1.05em; }

.knowledge-answer :is(ul, ol) {
  padding-inline-start: 1.55em;
}

.knowledge-answer > :first-child { margin-block-start: 0; }
.knowledge-answer > :last-child { margin-block-end: 0; }

.knowledge-answer li + li {
  margin-block-start: 0.55rem;
}

.knowledge-related {
  margin-block: 36px 44px;
}

@media (max-width: 700px) {
  .knowledge-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .knowledge-topic-nav { position: static; border-inline-end: 0; padding: 0 0 10px; border-block-end: 1px solid var(--line); }
  .knowledge-topic-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; }
  .knowledge-answer-header h1 { font-size: 1.95rem; }
}

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

.wrap-anywhere {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(66, 101, 83, 0.18);
  color: var(--muted);
  padding: 30px 0 42px;
}

.site-footer p {
  margin: 0;
}

.member-area { padding: 28px 0 48px; overflow-wrap: anywhere; }
.member-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.member-area h1 { font-size: 2.3rem; line-height: 1.15; margin: 0; }
.member-eyebrow { color: var(--green); font-weight: 700; font-size: .84rem; margin: 0 0 10px; }
.member-greeting { color: var(--muted); margin: 8px 0 0; }
.member-nav { display: flex; flex-wrap: wrap; gap: 0 24px; border-bottom: 1px solid #d6dfd9; }
.member-nav a { color: var(--muted); text-decoration: none; padding: 12px 0; border-bottom: 3px solid transparent; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.member-nav a[aria-current] { color: var(--green); border-color: var(--green); }
.member-nav a span { font-size: .8rem; min-width: 22px; text-align: center; background: #e7ece6; color: var(--green); border-radius: 4px; padding: 1px 5px; }
.member-nav a .unread-count { background: #a53d2c; color: #fff; }
.member-summary { display: flex; gap: 32px; align-items: center; border-bottom: 1px solid #d6dfd9; padding: 20px 0; color: var(--muted); }
.member-summary p { margin: 0; }
.member-summary strong { color: var(--ink); }
.member-summary .member-verification { margin-left: auto; font-size: .9rem; color: var(--green); }
.member-overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; }
.member-section { padding: 28px 0; min-width: 0; }
.member-area h2 { font-size: 1.4rem; line-height: 1.3; margin: 0; }
.member-area h3 { font-size: 1.13rem; line-height: 1.35; margin: 5px 0 8px; }
.member-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.member-section-heading > a { font-size: .92rem; flex-shrink: 0; }
.member-area a { color: var(--green); text-underline-offset: 3px; }
.member-area a.button-primary { color: #fff; }
.member-area h3 a, .member-follow-preview > a { text-decoration: none; font-weight: 700; }
.member-area h3 a:hover, .member-follow-preview > a:hover { text-decoration: underline; }
.member-empty { padding: 28px 0; color: var(--muted); }
.member-empty h3, .member-empty h2 { color: var(--ink); }
.member-empty p { margin: 10px 0 20px; max-width: 46ch; }
.member-update, .member-follow-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid #dfe4df; }
.member-update > div, .member-follow-row > div { min-width: 0; }
.member-update.is-unread { border-left: 3px solid var(--green); padding-left: 15px; background: #f4f8f3; padding-right: 12px; }
.member-update p, .member-follow-row p { color: var(--muted); font-size: .96rem; margin: 6px 0 0; }
.member-update-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; color: var(--muted); font-size: .82rem; }
.member-update-meta strong { color: var(--green); }
.member-text-button { padding: 7px 0; border: 0; background: transparent; color: var(--green); font: inherit; font-size: .9rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.member-update form, .member-follow-row form { flex-shrink: 0; }
.member-follow-preview { padding: 13px 0; border-bottom: 1px solid #dfe4df; display: grid; gap: 4px; }
.member-kind { color: var(--muted); text-transform: uppercase; font-size: .78rem; font-weight: 700; letter-spacing: 0; }
.member-email-note { margin-top: 25px; padding-top: 15px; }
.member-email-note p { color: var(--muted); font-size: .94rem; margin: 6px 0 12px; }
.member-email-note a { font-size: .94rem; }
.member-discovery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.member-discovery article { background: #fff; border: 1px solid #dce2dc; border-radius: 6px; padding: 18px; border-top: 3px solid #a53d2c; }
.member-discovery p { color: var(--muted); font-size: .9rem; margin-bottom: 0; }
.member-filter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 240px) auto; gap: 16px; align-items: end; padding: 28px 0 0; }
.member-filter .field { margin: 0; }
.member-filter input, .member-filter select { min-height: 48px; }
.member-filter button { height: 48px; }
.member-update-toolbar { padding-top: 28px; margin-bottom: 0; }
.member-view-options { display: flex; gap: 20px; }
.member-view-options a { padding: 8px 0; text-decoration: none; border-bottom: 2px solid transparent; }
.member-view-options a[aria-current] { border-color: var(--green); font-weight: 700; }
.member-settings-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 64px; padding: 30px 0; border-bottom: 1px solid #dce2dc; }
.member-settings-section > div > p { color: var(--muted); max-width: 38ch; margin: 10px 0; }
.member-fields { display: grid; gap: 20px; align-content: start; }
.member-fields .field { margin: 0; }
.member-fields > button { justify-self: start; }
.member-field-help, .password-help { display: block; color: var(--muted); font-size: .9rem; font-weight: 400; line-height: 1.5; margin: 7px 0 0; }
.password-help ul { padding-left: 20px; margin: 8px 0; }
.member-preference { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.member-preference input { width: 19px; height: 19px; flex: 0 0 19px; margin: 4px 0 0; accent-color: var(--green); }
.member-preference small { display: block; color: var(--muted); font-size: .96rem; margin-top: 5px; line-height: 1.5; }
.member-save-row { display: flex; justify-content: flex-end; padding-top: 24px; }
.member-notice { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 20px; background: #fff4e2; border-left: 3px solid #ba8841; margin: 24px 0; }
.member-notice p { margin: 5px 0 0; font-size: .96rem; }
.member-inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.member-details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 24px; margin: 0; }
.member-details dt { color: var(--muted); }
.member-details dd { margin: 0; overflow-wrap: anywhere; }
.archive-pagination { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 28px 0; }
.archive-pagination a { color: var(--green); font-weight: 700; }
.member-area :focus-visible { outline: 3px solid #a53d2c; outline-offset: 3px; }

@media (max-width: 860px) {
  .archive-list-page .series-filter { display: none; }
  .member-overview { grid-template-columns: 1fr; gap: 0; }
  .member-settings-section { grid-template-columns: 1fr; gap: 22px; }
  .member-discovery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-notice { flex-direction: column; align-items: stretch; }
  .member-filter { grid-template-columns: 1fr; }
  .member-heading form .button { width: auto; }
  .member-nav { gap: 0 18px; }
  .member-summary { flex-wrap: wrap; gap: 10px 22px; }
  .member-summary .member-verification { margin-left: 0; }
  .member-update, .member-follow-row { align-items: flex-start; }
  .member-update-toolbar { flex-wrap: wrap; }
  .site-header,
  .site-footer,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .archive-search,
  .auth-panel,
  .metadata {
    grid-template-columns: 1fr;
  }

  .archive-intro {
    padding-top: 30px;
  }

  .series-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .results-toolbar,
  .project-card {
    grid-template-columns: 1fr;
  }

  .page-intro-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-intro-actions .button {
    margin-bottom: 0;
  }

  .overview-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-context {
    align-items: stretch;
    flex-direction: column;
  }

  .account-status-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .follow-list-item {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .card-actions {
    width: 100%;
  }

  .card-actions {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .project-summary-with-photo { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .project-summary-with-photo .project-summary-text { grid-column: 1; grid-row: 1; }
  .project-summary-with-photo .reference-photo { grid-column: 1; grid-row: 2; }
  .project-summary-with-photo .reference-photo-compact { width: min(180px, 100%); }
  .archive-list-intro { padding-bottom: 12px; }
  .archive-title-row { gap: 2px 16px; }
  .archive-title-row .browse-link { min-height: 36px; }
  .photo-viewer-header { align-items: flex-start; flex-direction: column; }
  .photo-viewer { padding: 12px; }
  .member-area h1 { font-size: 1.8rem; }
  .member-heading { gap: 12px; }
  .member-discovery { grid-template-columns: 1fr; }
  .member-update, .member-follow-row { flex-direction: column; gap: 12px; }
  .member-heading .member-eyebrow { font-size: .75rem; }
  body {
    font-size: 16px;
  }

  .site-header,
  main,
  .site-footer {
    width: min(100% - 22px, 1120px);
  }

  .brand {
    align-items: center;
  }

  .site-nav { gap: 4px; }
  .site-nav a { padding: 9px 8px; font-size: .9rem; }
  .site-header { column-gap: 12px; }
  .account-nav { gap: 4px; }
  .account-nav .nav-account-action { padding: 5px 7px; font-size: .78rem; }

  .brand-waveform {
    width: 34px;
    height: 27px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 { font-size: 1.55rem; }
  .archive-intro { padding-top: 18px; }
  .page-intro { padding-top: 18px; }
  .series-grid, .category-grid { grid-template-columns: 1fr; }
  .sort-form select { flex: 1; width: auto; }
  .results-toolbar { gap: 12px; }
  .auth-panel { margin-top: 18px; }

  .archive-intro p,
  .page-intro p,
  .section-heading p {
    font-size: 1.04rem;
  }

  .search-panel {
    padding: 12px;
  }

  .overview-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .series-card,
  .project-card {
    min-height: auto;
    padding: 18px;
  }
}
