html {
  font-size: 14px;
}

:root {
  --ink: #17211b;
  --muted: #657269;
  --paper: #f5f3ed;
  --card: #fffdf8;
  --line: #d8d9d0;
  --accent: #496a54;
  --accent-soft: #dfe9e1;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  color: var(--ink);
  background: var(--paper);
}

.eyebrow { margin: 0 0 .35rem; color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.masters-page { padding: 1.5rem 0 4rem; }
.masters-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.masters-heading h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.4rem); font-weight: 700; letter-spacing: -.045em; }
.masters-heading p:last-child { max-width: 52rem; margin: .55rem 0 0; color: var(--muted); font-size: 1.05rem; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; margin: 1.5rem 0; }
.metric { display: flex; min-height: 7.2rem; flex-direction: column; justify-content: space-between; padding: 1rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--card); }
.metric strong { font-size: clamp(1.6rem, 3vw, 2.6rem); letter-spacing: -.04em; }
.metric span { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.metric.compact { min-width: 9rem; min-height: 6rem; }
.filter-bar { display: flex; align-items: end; gap: .75rem; padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--card); }
.filter-bar label { display: grid; flex: 1 1 14rem; gap: .35rem; color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; }
.filter-bar input, .filter-bar select { min-height: 2.7rem; padding: .55rem .7rem; border: 1px solid #bfc5bd; border-radius: .35rem; background: white; color: var(--ink); font: inherit; text-transform: none; }
.filter-bar button, .pager button { min-height: 2.7rem; padding: .55rem 1rem; border: 1px solid var(--accent); border-radius: .35rem; color: white; background: var(--accent); font-weight: 700; }
.filter-bar button:hover, .pager button:hover { background: #385841; }
.filter-bar button:disabled, .pager button:disabled { opacity: .4; }
.collection-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.work-card, .artist-card, .panel { overflow: hidden; border: 1px solid var(--line); border-radius: .7rem; background: var(--card); }
.work-image { display: grid; aspect-ratio: 4 / 3; place-items: center; overflow: hidden; color: var(--muted); background: #e6e4dc; }
.work-image img { width: 100%; height: 100%; object-fit: contain; }
.work-copy { padding: 1rem; }
.work-copy > p { margin: 0 0 .35rem; color: var(--accent); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.work-copy h2 { min-height: 2.6em; margin: 0; font-size: 1rem; }
.work-copy > strong { display: block; margin: .25rem 0 .75rem; color: var(--muted); }
.work-copy dl { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .75rem 0; }
.work-copy dl div { display: grid; }
.work-copy dt { color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.work-copy dd { margin: 0; font-size: .82rem; }
.artist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.artist-card { padding: 1.2rem; }
.artist-card h2 { margin: 0 0 .75rem; }
.artist-card p:not(.eyebrow) { display: -webkit-box; overflow: hidden; color: var(--muted); -webkit-box-orient: vertical; -webkit-line-clamp: 6; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.5rem 0; }
.progress-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.panel { padding: 1.25rem; }
.panel.wide { margin-top: 1rem; }
.action-panel { min-height: 10rem; color: inherit; text-decoration: none; }
.action-panel:hover { border-color: var(--accent); color: inherit; transform: translateY(-2px); }
.focus-row { display: grid; grid-template-columns: 2.2rem 1fr; gap: .75rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line); }
.focus-row > span { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: var(--accent-soft); font-weight: 800; }
.focus-row small, .data-table small { display: block; color: var(--muted); }
.section-title { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.section-title h2, .panel h2 { margin: 0 0 .75rem; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: .65rem; border-bottom: 2px solid var(--ink); color: var(--muted); font-size: .72rem; text-align: left; text-transform: uppercase; }
.data-table td { padding: .7rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.status { display: inline-block; padding: .2rem .45rem; border-radius: 999px; background: #ecece7; font-size: .7rem; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.status.a3_ready { color: #215a32; background: #dceede; }
.status.needs_hires, .status.needs_print_master { color: #79510d; background: #f5e8c9; }
.status.licensing { color: #6b3d63; background: #eee0ea; }
.empty-state { grid-column: 1 / -1; padding: 2rem; color: var(--muted); text-align: center; }

@media (max-width: 1000px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
  .artist-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .masters-heading, .filter-bar { align-items: stretch; flex-direction: column; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .collection-grid, .artist-grid, .progress-columns { grid-template-columns: 1fr; }
}

.changelog {
  max-height: 65vh;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-tertiary-bg);
  white-space: pre-wrap;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
