/* Painting Education Library — Bonnard/Vuillard interior palette */
:root {
  --ground: #E8E4EC;   /* lilac plaster */
  --paper:  #F5F2F6;
  --ink:    #2A2433;   /* aubergine */
  --soft:   #5E5568;
  --ochre:  #C9962E;
  --sage:   #7E8C6A;
  --violet: #6B4E7E;
  --rose:   #C98A8A;
  --line:   #CFC7D6;
  --focus:  #C9962E;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1.0625rem/1.6 Spectral, Georgia, serif;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* The wall: a woven Vuillard-style wallpaper, the one bold element */
.wall {
  padding: clamp(2.5rem, 7vw, 5.5rem) 16px;
  background-color: #8E7A98;
  background-image:
    radial-gradient(circle at 50% 50%, var(--ochre) 0 3px, transparent 4px),
    radial-gradient(circle at 0 0, #B9A4C2 0 6px, transparent 7px),
    repeating-linear-gradient(45deg, rgba(42,36,51,.18) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(-45deg, rgba(126,140,106,.35) 0 2px, transparent 2px 14px),
    linear-gradient(#8E7A98, #7D6A8A);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
}
.plate {
  max-width: 44rem; margin: 0 auto; background: var(--paper);
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--ink); box-shadow: 10px 10px 0 var(--ink);
}
.home { font-size: .95rem; color: var(--violet); text-decoration: none; border-bottom: 1px solid currentColor; }
h1 {
  font-weight: 300; font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05;
  letter-spacing: -.01em; margin: .6rem 0 1rem;
}
.lede { margin: 0; color: var(--soft); max-width: 36em; }

/* Filters */
.tools { max-width: 72rem; margin: 2.25rem auto 0; padding: 0 16px; }
.search input {
  width: 100%; max-width: 30rem; font: inherit; color: var(--ink);
  padding: .7rem .9rem; background: var(--paper); border: 1px solid var(--soft); border-radius: 2px;
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip {
  font: inherit; font-size: .95rem; cursor: pointer; color: var(--ink);
  background: transparent; border: 1px solid var(--soft); border-radius: 999px; padding: .3rem .9rem;
}
.chip[data-cat]:not([data-cat=""])::before {
  content: ""; display: inline-block; width: .6rem; height: .6rem; border-radius: 50%;
  background: var(--sw); margin-right: .45rem; vertical-align: .05em;
}
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Sections */
main { max-width: 72rem; margin: 0 auto; padding: 1rem 16px 3rem; }
.cat { margin-top: 2.75rem; }
h2 {
  font-weight: 400; font-size: 1.6rem; margin: 0 0 1rem;
  display: flex; align-items: center; gap: .65rem;
}
h2 small { font-size: 1rem; color: var(--soft); font-style: italic; }
.dab { width: 1.6rem; height: 1rem; background: var(--sw); border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%; flex: none; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  background: var(--line); border: 1px solid var(--line); }
.site { background: var(--paper); }
.site > a { display: flex; gap: 1rem; padding: 1rem; text-decoration: none; height: 100%; }
.site > a:hover strong { text-decoration: underline; text-decoration-color: var(--sw); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.pic {
  flex: none; width: 5.5rem; height: 5.5rem; position: relative; overflow: hidden;
  background: var(--sw); display: grid; place-items: center;
}
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.mono { color: var(--paper); font-size: 1.6rem; font-weight: 300; letter-spacing: .04em; }
.txt { display: flex; flex-direction: column; min-width: 0; }
.txt strong { font-weight: 600; line-height: 1.3; }
.txt em { font-size: .9rem; color: var(--soft); }
.desc { font-size: .95rem; line-height: 1.45; margin-top: .3rem; }
.featured .pic { box-shadow: inset 0 0 0 3px var(--ochre); }
.none { font-style: italic; color: var(--soft); margin-top: 2rem; }

footer { border-top: 1px solid var(--line); padding: 2rem 16px 3rem; text-align: center; color: var(--soft); font-size: .95rem; }
footer p { margin: .3rem 0; }

@media (max-width: 520px) {
  .plate { box-shadow: 6px 6px 0 var(--ink); }
  .pic { width: 4.25rem; height: 4.25rem; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; margin-right: -16px; padding-right: 16px; }
  .chip { white-space: nowrap; }
  h2 { font-size: 1.35rem; align-items: baseline; }
  .dab { align-self: center; }
}

/* ---------- Admin ---------- */
.admin { max-width: 64rem; margin: 0 auto; padding: 1.5rem 16px 4rem; }
.admin header.bar { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.admin h1 { font-size: 2rem; margin: 0; }
.panel { background: var(--paper); border: 1px solid var(--line); padding: 1.25rem; margin-top: 1.5rem; }
.panel h2 { font-size: 1.3rem; }
.form { display: grid; gap: .9rem; max-width: 40rem; }
.form label { display: grid; gap: .25rem; font-weight: 600; font-size: .95rem; }
.form input[type=text], .form input[type=url], .form input[type=password], .form select, .form textarea {
  font: inherit; font-weight: 400; padding: .55rem .7rem; border: 1px solid var(--soft); border-radius: 2px; background: #fff; color: var(--ink);
}
.form .hint { font-weight: 400; color: var(--soft); font-size: .9rem; }
.form .check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.btn { font: inherit; cursor: pointer; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); padding: .5rem 1rem; border-radius: 2px; text-decoration: none; display: inline-block; }
.btn.quiet { background: transparent; color: var(--ink); }
.btn.danger { background: #7A2E2E; border-color: #7A2E2E; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.msg { padding: .75rem 1rem; margin-top: 1rem; border-left: 4px solid var(--sage); background: var(--paper); }
.msg.err { border-color: #7A2E2E; }
table.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.list th, table.list td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list .pic { width: 3rem; height: 3rem; }
table.list .mono { font-size: 1rem; }
.status-bad { color: #7A2E2E; font-weight: 600; }
.status-ok { color: var(--sage); }
.inline { display: inline; }
@media (max-width: 640px) {
  table.list .hide-sm { display: none; }
}
