  :root {
    --wall: #1b231e;
    --wall-raised: #222c25;
    --ivory: #f1ede2;
    --stone: #a3aea4;
    --brass: #c69d5e;
    --brass-soft: rgba(198, 157, 94, 0.35);
    --line: rgba(241, 237, 226, 0.16);
    --shadow: 0 22px 45px -12px rgba(0, 0, 0, 0.65);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--wall);
    color: var(--ivory);
    font-family: "Outfit", system-ui, sans-serif;
    font-weight: 300;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }
  img { max-width: 100%; display: block; }
  a { color: inherit; }

  .display { font-family: "Fraunces", Georgia, serif; }

  .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--brass);
    font-weight: 500;
  }

  /* ---------- Nav ---------- */
  header.site {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
    background: rgba(27, 35, 30, 0.9);
    background: color-mix(in srgb, var(--wall) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .wordmark {
    font-family: "Fraunces", serif;
    font-size: 1.05rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
  }
  .wordmark span { color: var(--brass); }
  nav.rooms-nav { display: flex; gap: 1.6rem; flex-wrap: wrap; justify-content: flex-end; }
  nav.rooms-nav a {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--stone);
    transition: color 0.25s;
  }
  nav.rooms-nav a:hover, nav.rooms-nav a:focus-visible { color: var(--ivory); }
  nav.rooms-nav a.cta {
    color: var(--wall);
    background: var(--brass);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-weight: 500;
  }
  nav.rooms-nav a.cta:hover { background: var(--ivory); color: var(--wall); }

  /* ---------- Hero ---------- */
  .hero {
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    padding: clamp(3rem, 8vh, 6rem) clamp(1.25rem, 6vw, 5rem);
    min-height: 82vh;
  }
  .hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    font-weight: 380;
    line-height: 1.04;
    margin: 1.1rem 0 1.4rem;
    letter-spacing: -0.01em;
  }
  .hero h1 em { font-style: italic; color: var(--brass); }
  .hero p.lede { color: var(--stone); max-width: 34rem; font-size: 1.05rem; }
  .hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2.2rem; }
  .btn {
    display: inline-block;
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
    padding: 0.85rem 1.7rem;
    border-radius: 999px;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
  }
  .btn-solid { background: var(--brass); color: var(--wall); }
  .btn-solid:hover { background: var(--ivory); }
  .btn-ghost { border: 1px solid var(--line); color: var(--ivory); }
  .btn-ghost:hover { border-color: var(--brass); color: var(--brass); }

  .hero-canvas { position: relative; }
  .hero-canvas::before {
    content: "";
    position: absolute;
    inset: -18% -12%;
    background: radial-gradient(closest-side, var(--brass-soft), transparent 72%);
    filter: blur(10px);
    pointer-events: none;
  }
  .hero-canvas img {
    position: relative;
    width: 100%;
    box-shadow: var(--shadow);
  }
  .hero-caption {
    position: relative;
    margin-top: 1.1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--stone);
  }
  .hero-caption .t { font-family: "Fraunces", serif; font-style: italic; font-size: 1rem; color: var(--ivory); }

  /* ---------- Rooms ---------- */
  .room { padding: clamp(3rem, 8vh, 5.5rem) clamp(1.25rem, 6vw, 5rem); }
  .room-head { max-width: 46rem; margin-bottom: 3rem; }
  .room-head h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    font-weight: 400;
    margin: 0.7rem 0 1rem;
  }
  .room-head p { color: var(--stone); }

  /* the hanging rail: a rule the paintings hang from on thin wires */
  .grid {
    border-top: 1px solid var(--line);
    padding-top: 44px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 3.2rem 2.2rem;
  }
  figure.work { position: relative; cursor: pointer; }
  figure.work::before {
    content: "";
    position: absolute;
    top: -44px;
    left: 50%;
    width: 1px;
    height: 44px;
    background: var(--line);
  }
  figure.work img {
    width: 100%;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
  }
  figure.work:hover img, figure.work:focus-visible img {
    transform: translateY(-5px);
    box-shadow: 0 30px 55px -12px rgba(0, 0, 0, 0.75), 0 0 60px -10px var(--brass-soft);
  }
  figure.work figcaption { margin-top: 0.95rem; }
  figure.work .t {
    font-family: "Fraunces", serif;
    font-style: italic;
    font-size: 1.12rem;
    line-height: 1.3;
  }
  figure.work .d {
    margin-top: 0.25rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--stone);
  }
  figure.work .p { color: var(--brass); font-weight: 500; }

  /* entrance animation: runs once at load, can never leave content hidden */
  @keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }
  .reveal { animation: rise 0.7s ease backwards; }

  /* ---------- About ---------- */
  .about {
    background: var(--wall-raised);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 5vw, 5rem);
    padding: clamp(3rem, 8vh, 6rem) clamp(1.25rem, 6vw, 5rem);
    align-items: center;
  }
  .about img { box-shadow: var(--shadow); }
  .about h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 400; margin: 0.7rem 0 1.2rem; }
  .about p { color: var(--stone); margin-bottom: 1rem; max-width: 40rem; }
  .about p strong { color: var(--ivory); font-weight: 500; }
  blockquote {
    font-family: "Fraunces", serif;
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--ivory);
    border-left: 2px solid var(--brass);
    padding-left: 1.3rem;
    margin: 1.8rem 0 0;
  }

  /* ---------- Commissions ---------- */
  .commissions { padding: clamp(3rem, 8vh, 6rem) clamp(1.25rem, 6vw, 5rem); text-align: center; }
  .commissions .inner { max-width: 44rem; margin: 0 auto; }
  .commissions h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 400; margin: 0.7rem 0 1.2rem; }
  .commissions p { color: var(--stone); margin-bottom: 1rem; }
  .note {
    display: inline-block;
    margin-top: 1.4rem;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass);
    border: 1px solid var(--brass-soft);
    border-radius: 999px;
    padding: 0.5rem 1.2rem;
  }

  /* ---------- Footer ---------- */
  footer {
    border-top: 1px solid var(--line);
    padding: clamp(2.5rem, 6vh, 4rem) clamp(1.25rem, 6vw, 5rem);
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    align-items: flex-end;
  }
  footer .contact a {
    display: block;
    font-family: "Fraunces", serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    text-decoration: none;
    margin-top: 0.4rem;
    /* A long email address has no spaces to wrap at, so without this it pushes the
       whole page wider than a small phone screen. */
    overflow-wrap: anywhere;
  }
  footer .contact a:hover { color: var(--brass); }
  footer small { color: var(--stone); font-size: 0.78rem; letter-spacing: 0.06em; }

  /* ---------- Lightbox ---------- */
  .lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 16, 13, 0.94);
    padding: clamp(1rem, 4vw, 3rem);
  }
  .lightbox.open { display: flex; }
  .lb-inner { max-width: min(92vw, 60rem); text-align: center; }
  .lb-inner img {
    max-height: 72vh;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    box-shadow: var(--shadow);
  }
  .lb-meta { margin-top: 1.2rem; }
  .lb-meta .t { font-family: "Fraunces", serif; font-style: italic; font-size: 1.4rem; }
  .lb-meta .d { color: var(--stone); font-size: 0.85rem; margin-top: 0.2rem; }
  .lb-meta .p { color: var(--brass); font-weight: 500; }
  .lb-meta a.btn { margin-top: 1.1rem; }
  .lb-close, .lb-prev, .lb-next {
    position: fixed;
    background: none;
    border: 1px solid var(--line);
    color: var(--ivory);
    border-radius: 999px;
    width: 2.9rem;
    height: 2.9rem;
    font-size: 1.15rem;
    cursor: pointer;
    transition: border-color 0.25s, color 0.25s;
  }
  .lb-close:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--brass); color: var(--brass); }
  .lb-close { top: 1.2rem; right: 1.2rem; }
  .lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
  .lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }

  @media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; min-height: 0; }
    /* minmax(0,...) lets the column shrink below the photo's own width, and the min()
       keeps the photo inside it. Without both, the 26rem photo forces the page wider
       than a phone screen and everything scrolls sideways. */
    .about { grid-template-columns: minmax(0, 1fr); }
    .about img { max-width: min(26rem, 100%); }
    nav.rooms-nav a:not(.cta) { display: none; }
    footer .contact a { font-size: clamp(1.05rem, 5vw, 1.6rem); }
    .lb-prev { top: auto; bottom: 1.2rem; transform: none; }
    .lb-next { top: auto; bottom: 1.2rem; }
  }

  /* Smallest phones: the name and the "Get in touch" pill will not sit on one line. */
  @media (max-width: 380px) {
    header.site { flex-wrap: wrap; gap: 0.7rem 1rem; padding-left: 1rem; padding-right: 1rem; }
    .wordmark { font-size: 0.95rem; }
    nav.rooms-nav a.cta { padding: 0.4rem 0.9rem; font-size: 0.72rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { animation: none; }
    figure.work img { transition: none; }
  }

  /* ---------- Cookie choice for Google Analytics ---------- */
  .consent {
    position: fixed;
    z-index: 90;                       /* below the painting viewer (100) */
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    width: min(44rem, calc(100% - 2rem));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.4rem;
    padding: 1rem 1.3rem;
    background: var(--wall-raised);
    border: 1px solid var(--brass-soft);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }
  /* The display:flex above would otherwise beat the hidden attribute, leaving the banner on
     screen after Accept or Decline (reported live, 14 Sep 2026). */
  .consent[hidden] { display: none; }
  .consent p { flex: 1 1 18rem; margin: 0; font-size: 0.92rem; color: var(--ivory); }
  .consent-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
  .consent .btn { border: 0; cursor: pointer; font-family: inherit; padding: 0.7rem 1.4rem; }
  .consent .btn-ghost { border: 1px solid var(--line); background: none; }
  .foot-links { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: flex-end; }
  button.admin-link { background: none; font-family: inherit; cursor: pointer; }
  @media (max-width: 860px) { .foot-links { justify-content: flex-start; } }

  /* ---------- Links to each painting's own page ---------- */
  img { height: auto; }  /* images now carry width/height attributes; keep their proportions */
  figure.work a.work-link { display: block; color: inherit; text-decoration: none; }
  figure.work h3.t { margin: 0; font-weight: 400; }
  figure.work a.work-link:focus-visible { outline: 2px solid var(--brass); outline-offset: 6px; }
  figure.work a.work-link:focus-visible img {
    transform: translateY(-5px);
    box-shadow: 0 30px 55px -12px rgba(0, 0, 0, 0.75), 0 0 60px -10px var(--brass-soft);
  }
  .hero-canvas > a { display: block; position: relative; }
  .hero-caption a.t { text-decoration: none; }
  .hero-caption a.t:hover { color: var(--brass); }
  .lb-more {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brass);
  }

  /* ---------- A painting's own page ---------- */
  .crumbs {
    padding: 1.3rem clamp(1.25rem, 6vw, 5rem) 0;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--stone);
  }
  .crumbs a { color: var(--stone); text-decoration: none; }
  .crumbs a:hover { color: var(--brass); }
  .painting-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
    padding: clamp(1.5rem, 5vh, 3.5rem) clamp(1.25rem, 6vw, 5rem) clamp(3rem, 8vh, 5rem);
  }
  .painting-image img { width: 100%; box-shadow: var(--shadow); }
  .painting-info h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 380;
    line-height: 1.08;
    margin: 0.8rem 0;
  }
  .painting-info .facts { color: var(--stone); }
  .painting-info .price { font-family: "Fraunces", Georgia, serif; font-size: 1.9rem; color: var(--brass); margin: 0.3rem 0 1.4rem; }
  .painting-info .about-painting { max-width: 34rem; margin-bottom: 1rem; }
  .painting-info .by { color: var(--stone); font-size: 0.92rem; margin-bottom: 1.6rem; }
  .painting-info .email-alt { margin-top: 1rem; font-size: 0.92rem; color: var(--stone); }
  .painting-info .email-alt a { color: var(--brass); overflow-wrap: anywhere; }
  .back-link {
    display: inline-block;
    margin-top: 1.8rem;
    color: var(--stone);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
  }
  .back-link:hover { color: var(--brass); }
  .room.more { border-top: 1px solid var(--line); }
  .error-page { min-height: 50vh; }
  .error-page h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 400; margin: 0.7rem 0 1.2rem; }
  @media (max-width: 860px) {
    .painting-layout { grid-template-columns: minmax(0, 1fr); }
  }

  /* ---------- Plain email address under the email buttons ----------
     For visitors with no email program set up, where the button appears to do nothing. */
  .commissions p.email-alt { margin: 1rem 0 0; font-size: 0.92rem; }
  .lb-alt { margin-top: 0.7rem; font-size: 0.85rem; color: var(--stone); }
  .email-alt a, .lb-alt a { color: var(--brass); overflow-wrap: anywhere; }
  .email-alt a:hover, .lb-alt a:hover { color: var(--ivory); }

  /* ---------- Footer extras (admin sign-in link) ---------- */
  footer .foot-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.8rem; }
  .admin-link {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--stone);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    transition: color 0.25s, border-color 0.25s;
  }
  .admin-link:hover, .admin-link:focus-visible { color: var(--brass); border-color: var(--brass); }
  @media (max-width: 860px) {
    footer .foot-right { align-items: flex-start; }
  }
