:root {
  --paper: #efeae2;
  --paper-2: #f7f4ef;
  --ink: #1c1915;
  --muted: #5e584f;
  --line: #ddd6cb;
  --line-strong: #c9c0b4;
  --accent: #8a332c;
  --header-h: 4.4rem;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --shadow: 0 24px 60px rgba(28, 25, 21, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 380;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button,
a,
label,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--paper-2);
}

h1,
h2,
h3,
.logo,
.work-title,
.medium-name,
.preview-heading {
  font-family: var(--serif);
  font-weight: 460;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 0.9rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(1180px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.prose {
  white-space: pre-line;
}

.measure {
  max-width: 40rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 520;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.index-num {
  color: var(--accent);
  font-style: italic;
  margin-right: 0.35rem;
}

.config-banner,
.loading-note {
  margin: 0;
  padding: 0.7rem 1.2rem;
  background: #e7d3b4;
  color: var(--ink);
  text-align: center;
  font-size: 0.92rem;
}

.config-banner.is-warn {
  background: #edd4cf;
}

.loading-note {
  background: transparent;
  color: var(--muted);
  padding-top: 1.2rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 1.3rem;
  background: rgba(239, 234, 226, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.logo {
  font-size: 1.55rem;
  font-style: italic;
  text-decoration: none;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-link {
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 0.1rem;
  border-bottom: 1px solid transparent;
}

.nav-link[aria-current="page"] {
  border-bottom-color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  padding: 0;
  position: relative;
}

.nav-toggle-bar {
  position: absolute;
  left: 0.72rem;
  right: 0.72rem;
  top: 1.35rem;
  height: 1px;
  background: var(--ink);
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ink);
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.site-header.is-open .nav-toggle-bar { background: transparent; }
.site-header.is-open .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.site-header.is-open .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }

.hero {
  padding: clamp(2.2rem, 6vw, 5rem) 0 1rem;
}

/* Wide screens: the whole hero fits in one screen, so nothing is cut off at the fold. */
@media (min-width: 981px) {
  .hero {
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    display: flex;
    align-items: center;
    padding: 1.5rem 0;
  }

  .hero-title {
    font-size: clamp(2.8rem, min(7.2vw, 12vh), 6.5rem);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
}

.hero-grid.is-single {
  grid-template-columns: 1fr;
}

.hero-copy,
.hero-visual {
  min-width: 0;
}

.hero-title {
  margin: 0.35rem 0 1rem;
  font-style: italic;
  font-size: clamp(3.3rem, 7.2vw, 6.5rem);
  line-height: 0.9;
}

.hero-intro {
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper-2);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 520;
}

.button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.button-ghost {
  background: transparent;
  color: var(--ink);
}

.button-ghost:hover {
  background: var(--ink);
  color: var(--paper-2);
}

.button-small {
  min-height: 2.3rem;
  padding: 0.4rem 0.75rem;
  letter-spacing: 0.06em;
}

.button-danger {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.button-danger:hover {
  background: var(--accent);
  color: var(--paper-2);
}

.hero-open,
.work-open,
.table-work {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
}

.hero-frame,
.work-frame {
  display: block;
  overflow: hidden;
  background: #e4ddd3;
}

.hero-frame img,
.work-frame img,
.table-work img,
.art-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Works are shown as they are: no frame, no crop, each at its own proportions. */
.work-frame {
  background: transparent;
}

.work-frame img {
  height: auto;
  object-fit: contain;
  object-position: center;
}

.table-work img {
  object-fit: contain;
  object-position: center;
}

.hero-frame {
  aspect-ratio: 4 / 5;
  max-height: 74vh;
}

.hero-frame img {
  transition: transform 0.7s ease;
}

.hero-open:hover img,
.work-open:hover img {
  transform: scale(1.035);
}

.work-frame.is-missing,
.hero-frame.is-missing {
  min-height: 180px;
  background:
    linear-gradient(135deg, transparent 46%, var(--line-strong) 46%, var(--line-strong) 54%, transparent 54%),
    #e4ddd3;
}

.work-meta,
.hero-caption {
  display: grid;
  gap: 0.15rem;
  padding-top: 0.75rem;
}

.work-title {
  font-size: 1.28rem;
  line-height: 1.15;
}

.work-line {
  color: var(--muted);
  font-size: 0.9rem;
}

.medium-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

body.modal-open {
  overflow: hidden;
}

.section {
  padding: clamp(2.4rem, 5vw, 4.4rem) 0;
}

/* Categories and Bio each fill one screen, content centred, like the hero. */
#mediums,
.about {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Links such as the navbar's Bio land just under the sticky header. No scroll snapping,
   so the page can always rest anywhere, including on the footer. */
html {
  scroll-padding-top: var(--header-h);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head h2,
.page-head h1,
.about h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1;
}

.carousel-controls {
  display: flex;
  gap: 0.4rem;
}

.icon-btn {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 999px;
}

.icon-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.carousel {
  display: flex;
  gap: 1.15rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.4rem;
  scrollbar-color: var(--line-strong) transparent;
}

.carousel .work-card {
  flex: 0 0 min(78vw, 300px);
  scroll-snap-align: start;
}

.view-grid .work-frame,
.carousel .work-frame {
  aspect-ratio: auto;
}

/* Pictures sit centred in their cell; captions line up along the bottom of each row. */
.view-grid .work-card,
.carousel .work-card {
  display: flex;
  flex-direction: column;
}

.view-grid .work-open,
.carousel .work-open {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.view-grid .work-frame,
.carousel .work-frame {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-grid .work-frame img,
.carousel .work-frame img {
  margin: 0 auto;
}

.view-grid .work-meta,
.carousel .work-meta {
  text-align: center;
}

.medium-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.medium-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  min-height: 5.4rem;
  padding: 1.15rem 0.85rem 1.15rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.medium-link:hover {
  color: var(--accent);
}

.medium-name {
  font-size: clamp(1.45rem, 2vw, 1.9rem);
}

.medium-count {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: first baseline;
  margin-top: 0;
}

.about-copy {
  min-width: 0;
}

/* Optional picture on the left of the biography (set in Admin → Texts → Bio picture). */
.about-photo {
  margin: 0;
  min-width: 0;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 18rem;
  object-fit: cover;
  border-radius: 6px;
  background: var(--paper-2);
}

/* With a picture: "Bio" sits on its own row above everything. Under it, the picture, the
   biography text and the exhibitions start on the same line. */
.about-grid.has-photo {
  grid-template-columns: minmax(0, 0.46fr) minmax(0, 1.2fr) minmax(0, 0.95fr);
  grid-template-areas:
    "title title title"
    "photo text exhibitions";
  row-gap: 1.4rem;
  align-items: start;
}

.about-grid.has-photo .about-copy { display: contents; }
.about-grid.has-photo .about-copy h2 { grid-area: title; }
.about-grid.has-photo .about-copy .measure { grid-area: text; margin: 0; }
.about-grid.has-photo .about-photo { grid-area: photo; margin-top: 0; }
.about-grid.has-photo .exhibitions { grid-area: exhibitions; }

/* The empty space above the first letters differs per font size, so nudge each item until the
   picture, the first line of text and the exhibitions heading start at the same height. */
@media (min-width: 641px) {
  .about-grid.has-photo .about-photo { margin-top: calc(1.12rem * 0.4123); }
}

@media (min-width: 981px) {
  .about-grid.has-photo .exhibitions h3 {
    margin-top: calc(1.12rem * 0.4123 - clamp(1.4rem, 2vw, 1.8rem) * 0.1951);
  }
}
@media (max-width: 980px) {
  .about-grid.has-photo {
    grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.2fr);
    grid-template-areas:
      "title title"
      "photo text"
      "photo exhibitions";
  }
}

@media (max-width: 640px) {
  .about-grid.has-photo {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "photo"
      "text"
      "exhibitions";
  }
  .about-grid.has-photo .about-photo img {
    max-height: 15rem;
    width: auto;
    max-width: 100%;
  }
}

.exhibitions h3 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-style: italic;
  line-height: 1.1;
}

.exhibition-list {
  margin: 0;
  padding-left: 1.2rem;
  list-style: disc;
  display: grid;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.exhibition-list li::marker {
  color: var(--accent);
}

@media (max-width: 760px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about .measure {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.page-head {
  padding: clamp(2.2rem, 6vw, 4.2rem) 0 0.4rem;
}

.page-head h1 {
  margin: 0.35rem 0 0.8rem;
  font-size: clamp(3.2rem, 7vw, 5.6rem);
  font-style: italic;
  line-height: 0.92;
}

.page-head .measure {
  color: var(--muted);
}

.toolbar-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 8;
  padding: 0.85rem 0 0.7rem;
  background: rgba(239, 234, 226, 0.94);
  backdrop-filter: blur(12px);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem 1.2rem;
}

.toolbar-filters {
  display: grid;
  gap: 0.55rem;
  min-width: min(100%, 36rem);
}

.filters,
.subfilters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-btn,
.view-btn {
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 999px;
  min-height: 2.2rem;
  padding: 0.3rem 0.8rem;
}

.filter-btn[aria-pressed="true"],
.view-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper-2);
  border-color: var(--ink);
}

.subfilters .filter-btn {
  background: transparent;
  border-style: dashed;
}

.subfilters .filter-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper-2);
  border-color: var(--ink);
  border-style: solid;
}

.toolbar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.view-bar {
  padding: 0.5rem 0 0.9rem;
}

/* Extra text for the chosen category: two lines, then "Read more". */
.category-note {
  padding: 0.9rem 0 0.2rem;
}

.note-body {
  max-width: 46rem;
  position: relative;
}

.note-text {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

.note-text.is-clamped {
  max-height: 3.2em;
  overflow: hidden;
}

.note-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  margin-top: 0.35rem;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 520;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* While collapsed, the button sits at the end of the second row. */
.note-toggle.is-inline {
  position: absolute;
  right: 0;
  bottom: 0;
  margin: 0;
  padding-left: 2.4rem;
  line-height: 1.6;
  background: linear-gradient(to right, rgba(239, 234, 226, 0), var(--paper) 1.8rem);
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.view-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}

.view-btn {
  border: 0;
  border-radius: 0;
}

.gallery-section {
  padding: 0.4rem 0 4rem;
}

.view-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8rem 1.15rem;
  align-items: stretch;
}

.view-masonry {
  columns: 3 240px;
  column-gap: 1.15rem;
}

.view-masonry .work-card {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 1.35rem;
}

.view-masonry .work-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #e4ddd3;
}

.empty {
  color: var(--muted);
  padding: 2rem 0 3rem;
}

.table-scroll {
  overflow-x: auto;
}

.work-table {
  width: 100%;
  border-collapse: collapse;
}

.work-table th,
.work-table td {
  text-align: left;
  padding: 0.85rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.work-table th {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 520;
}

.work-table tbody tr:hover {
  background: rgba(255, 252, 248, 0.55);
}

.table-work {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--serif);
  font-size: 1.2rem;
}

.table-work img {
  width: 64px;
  height: 76px;
  object-fit: contain;
  flex: none;
}

.year-cell {
  white-space: nowrap;
  color: var(--muted);
}

.lightbox {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  border: 0;
  padding: clamp(0.8rem, 2vw, 1.5rem);
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(20, 16, 12, 0.84);
}

.lightbox-layout {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.75rem 1.1rem;
  pointer-events: none;
}

.lightbox-layout > * {
  pointer-events: auto;
}

.lightbox-close {
  grid-column: 1 / -1;
  justify-self: end;
}

.lightbox-stage {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.75rem;
  pointer-events: none;
}

.lightbox-stage > * {
  pointer-events: auto;
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  background: var(--paper);
  color: var(--ink);
  min-width: 2.8rem;
  min-height: 2.8rem;
  padding: 0 0.85rem;
}

.lightbox-nav {
  align-self: center;
}

.lightbox-figure {
  position: relative;
  margin: 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.lightbox-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.lightbox-copy {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  background: var(--paper);
  padding: 1.2rem 1.15rem 1.3rem;
  position: relative;
  z-index: 1;
}

.lightbox-copy h2 {
  margin: 0.35rem 0 0.45rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.02;
}

.lightbox-kicker,
.lightbox-year {
  margin: 0;
  color: var(--muted);
}

.lightbox-description {
  margin-top: 1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 2rem 0 4.5rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.contact-list li {
  display: grid;
  gap: 0.1rem;
}

.contact-label {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-list a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

.field {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.95rem;
}

.field-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea,
.field select,
.search-label input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 0;
  padding: 0.7rem 0;
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.was-validated input:invalid,
.was-validated textarea:invalid {
  border-bottom-color: var(--accent);
}

.field-hint,
.status-line,
.form-success {
  color: var(--muted);
  font-size: 0.92rem;
}

.form-error {
  color: var(--accent);
  min-height: 1.2em;
}

.form-actions,
.editor-foot,
.settings-save {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr auto;
  gap: 1rem 2rem;
  align-items: start;
}

.footer-brand {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
}

.footer-tag,
.footer-copy {
  color: var(--muted);
  margin-top: 0.3rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-social {
  display: inline-flex;
  line-height: 0;
}

.footer-social svg {
  display: block;
}

.footer-links a.footer-social:hover {
  color: var(--accent);
}

.login-screen {
  display: grid;
  place-items: center;
  padding: 6vh 1rem 3rem;
}

.auth-card {
  width: min(440px, 100%);
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: clamp(1.3rem, 3vw, 2rem);
}

.auth-card-wide {
  width: min(640px, 100%);
}

.auth-card h1,
.panel-head h1,
.editor-body h2 {
  margin: 0.3rem 0 0.55rem;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-style: italic;
  line-height: 0.95;
}

.auth-card > p,
.panel-head p {
  color: var(--muted);
}

.setup-steps {
  margin: 1rem 0 1.4rem;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
}

.setup-steps code,
.field-hint code {
  font-family: "Segoe UI", monospace;
  font-size: 0.92em;
}

#app[hidden],
[hidden] {
  display: none !important;
}

.admin-bar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(239, 234, 226, 0.94);
  backdrop-filter: blur(12px);
}

.admin-brand {
  display: grid;
}

.admin-brand strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 460;
  font-style: italic;
}

.who {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 3rem;
}

.admin-nav {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.admin-nav button {
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 999px;
  min-height: 2.4rem;
  padding: 0.3rem 0.9rem;
}

.admin-nav button[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper-2);
  border-color: var(--ink);
}

.cat-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: end;
  max-width: 46rem;
  margin-bottom: 0.4rem;
}

.cat-form .button {
  min-height: 3rem;
}

.cat-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.2rem;
  max-width: 46rem;
}

.cat-group {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper-2);
  padding: 0.3rem 1rem 0.5rem;
}

.cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.6rem 0;
  flex-wrap: wrap;
}

.cat-subs {
  margin: 0 0 0.3rem 1.1rem;
  border-left: 2px solid var(--line);
  padding-left: 0.9rem;
}

.cat-subs .cat-row + .cat-row {
  border-top: 1px dashed var(--line);
}

.cat-name {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
  min-width: 0;
}

.cat-name h3 {
  margin: 0;
  font-size: 1.25rem;
}

.cat-count {
  color: var(--muted);
  font-size: 0.85rem;
}

.cat-none {
  margin: 0 0 0.4rem 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.cat-rename {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 2.4rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.cat-row button:disabled {
  opacity: 0.35;
  cursor: default;
}

.bio-photo-row {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.bio-photo-preview {
  display: grid;
  place-items: center;
  width: 8.5rem;
  min-height: 10.5rem;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.bio-photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-photo-actions {
  flex: 1 1 14rem;
  display: grid;
  gap: 0.6rem;
}

.bio-photo-actions .field-hint,
.bio-photo-actions .status-line {
  margin: 0;
}

.cat-chip {
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.cat-chip.is-on {
  border-color: var(--accent);
  color: var(--accent);
}

.cat-toggle {
  min-width: 6.2rem;
}

.cat-toggle.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.cat-toggle.is-off {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}

.cat-row.is-texting {
  display: grid;
  gap: 0.7rem;
  justify-content: stretch;
}

.cat-text-field textarea {
  width: 100%;
  min-height: 9rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.cat-text-show {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cat-notice {
  max-width: 46rem;
  margin-top: 1.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: var(--paper-2);
}

.cat-notice p {
  margin: 0 0 0.6rem;
}

.cat-notice pre {
  margin: 0 0 0.7rem;
  padding: 0.7rem 0.9rem;
  overflow-x: auto;
  border-radius: 10px;
  background: #fff;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre;
}

@media (max-width: 760px) {
  .cat-form {
    grid-template-columns: 1fr;
  }
}

.guide {
  display: grid;
  gap: 0.6rem;
  max-width: 46rem;
}

.guide details {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper-2);
  padding: 0 1.1rem;
}

.guide summary {
  cursor: pointer;
  padding: 0.95rem 0;
  font-weight: 520;
  list-style-position: outside;
}

.guide details[open] summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.8rem;
}

.guide details > :last-child {
  margin-bottom: 1.1rem;
}

.guide p,
.guide li {
  color: var(--muted);
  line-height: 1.6;
}

.guide ol,
.guide ul {
  margin: 0 0 0.8rem;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.45rem;
}

.guide a {
  color: var(--accent);
  text-decoration: underline;
}

.guide code {
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.05rem 0.35rem;
  border-radius: 5px;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.75fr);
  gap: 1.4rem;
  align-items: start;
}

.settings-group {
  border: 0;
  margin: 1.5rem 0 0;
  padding: 0;
}

.settings-group legend {
  font-family: var(--serif);
  font-size: 1.7rem;
  padding: 0;
}

.settings-save {
  position: sticky;
  bottom: 0;
  padding: 0.8rem 0;
  background: rgba(239, 234, 226, 0.95);
}

.preview-card {
  position: sticky;
  top: 5.4rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 1.1rem 1rem 1.3rem;
}

.preview-card.is-live {
  border-color: var(--accent);
}

.preview-label {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.preview-kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  margin: 0.2rem 0 0.6rem;
}

.preview-heading {
  margin: 0.25rem 0 0.7rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-style: italic;
  line-height: 0.95;
}

.preview-card h3 {
  margin: 1rem 0 0.35rem;
  font-size: 1.35rem;
}

.art-toolbar,
.message-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.search-label {
  display: grid;
  gap: 0.2rem;
  flex: 1;
  max-width: 24rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.art-list,
.message-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.art-row,
.message {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.message {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.art-thumb {
  width: 74px;
  height: 88px;
  object-fit: cover;
  background: #e4ddd3;
}

.art-row h3,
.message h3 {
  margin: 0;
  font-size: 1.25rem;
}

.art-row p,
.message p {
  color: var(--muted);
  font-size: 0.92rem;
}

.art-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.check-row input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.editor-dialog {
  width: min(640px, calc(100vw - 1.5rem));
  max-height: min(920px, calc(100vh - 1.5rem));
  border: 0;
  padding: 0;
  background: var(--paper);
  color: inherit;
  box-shadow: var(--shadow);
}

.editor-dialog::backdrop {
  background: rgba(20, 16, 12, 0.62);
}

.editor-body {
  padding: 1.1rem 1.15rem 1.3rem;
}

.editor-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.art-preview {
  margin-top: 0.8rem;
  width: min(100%, 280px);
  max-height: 320px;
  object-fit: contain;
  background: #e4ddd3;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%) translateY(1rem);
  z-index: 50;
  min-width: min(420px, calc(100% - 2rem));
  max-width: calc(100% - 2rem);
  padding: 0.8rem 1rem;
  background: var(--ink);
  color: var(--paper-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.is-error {
  background: var(--accent);
}

@media (max-width: 980px) {
  .view-grid,
  .medium-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .contact-grid,
  .settings-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .lightbox-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .lightbox-close,
  .lightbox-stage,
  .lightbox-copy {
    grid-column: 1;
  }

  .lightbox-close { grid-row: 1; }
  .lightbox-stage { grid-row: 2; }
  .lightbox-copy {
    grid-row: 3;
    align-self: stretch;
    max-height: 34vh;
  }

  .preview-card {
    position: static;
  }
}

.filter-toggle,
.filter-panel {
  display: none;
}

@media (max-width: 760px) {
  .site-header {
    padding: 0 0.7rem 0 1.1rem;
  }

  .logo {
    font-size: 1.4rem;
    white-space: nowrap;
  }

  .nav-toggle {
    display: inline-block;
  }

  /* Filter button sits right beside the menu button. */
  .filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    position: relative;
    margin-left: auto;
    margin-right: 0.2rem;
    min-height: 2.5rem;
    padding: 0 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    font-size: 0.88rem;
  }

  .filter-toggle[aria-expanded="true"] {
    background: var(--ink);
    color: var(--paper-2);
    border-color: var(--ink);
  }

  .filter-toggle-dot {
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--paper);
  }

  .site-header.is-filter-open .filter-panel {
    display: block;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 30;
    padding: 0.9rem 1.1rem 1.15rem;
    max-height: calc(100vh - var(--header-h) - 1rem);
    max-height: calc(100svh - var(--header-h) - 1rem);
    overflow-y: auto;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(28, 25, 21, 0.12);
  }

  .filter-panel .toolbar-filters {
    min-width: 0;
    gap: 0.8rem;
  }

  .filter-panel .filter-btn {
    min-height: 2.4rem;
    padding: 0.3rem 0.95rem;
  }

  /* The three hero buttons stay on one row. */
  .hero-actions {
    flex-wrap: nowrap;
    gap: 0.45rem;
  }

  .hero-actions .button {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  .carousel .work-card {
    flex: 0 0 44vw;
  }

  .view-masonry {
    columns: 2;
    column-gap: 0.7rem;
  }

  .view-masonry .work-card {
    margin-bottom: 1rem;
  }

  .work-title {
    font-size: 1.05rem;
  }

  .work-line {
    font-size: 0.78rem;
  }

  /* On phones the filters live in the drop-down, so the sticky bar is not needed. */
  .toolbar-wrap {
    display: none;
  }

  .category-note {
    padding-top: 1.1rem;
  }

  .note-text {
    font-size: 1rem;
  }

  /* Picture viewer: the picture uses the full width; the arrows float over it. */
  .lightbox {
    padding: 0.6rem;
  }

  .lightbox-stage {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .lightbox-stage .lightbox-figure {
    grid-column: 1;
    grid-row: 1;
  }

  .lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    min-width: 2.7rem;
    min-height: 2.7rem;
    padding: 0;
    border-radius: 50%;
    background: rgba(247, 244, 239, 0.88);
    font-size: 0;
    line-height: 1;
  }

  .lightbox-nav::before {
    font-size: 1.2rem;
  }

  .lightbox-nav[data-lightbox="prev"] {
    left: 0.3rem;
  }

  .lightbox-nav[data-lightbox="prev"]::before {
    content: "\2190";
  }

  .lightbox-nav[data-lightbox="next"] {
    right: 0.3rem;
  }

  .lightbox-nav[data-lightbox="next"]::before {
    content: "\2192";
  }

  .lightbox-copy {
    max-height: 28vh;
    padding: 0.9rem 1rem 1rem;
  }

  .lightbox-copy h2 {
    font-size: 1.6rem;
  }

  .admin-nav {
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 30;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.5rem 1.2rem 1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .site-header.is-open .nav-links {
    display: flex;
  }

  .nav-link {
    padding: 0.7rem 0;
    width: 100%;
  }

  /* Works are shown two by two. */
  .view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.3rem 0.7rem;
  }

  .medium-list {
    grid-template-columns: 1fr;
  }

  .art-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .art-actions {
    grid-column: 1 / -1;
  }

  .admin-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Small phones: the Filter button shows only its icon so the header never overflows. */
@media (max-width: 380px) {
  .logo {
    font-size: 1.22rem;
  }

  .filter-toggle {
    padding: 0 0.65rem;
  }

  .filter-toggle-label {
    display: none;
  }

  .hero-actions .button {
    padding: 0.65rem 0.6rem;
    font-size: 0.62rem;
    letter-spacing: 0.03em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .carousel {
    scroll-behavior: auto;
  }
}
