:root {
  --bg: #f6f7f9; --card: #fff; --ink: #1d2330; --muted: #667085; --line: #e4e7ec;
  --accent: #1f4fd1; --accent-ink: #fff; --a: #0e8a4f; --b: #1f4fd1; --c: #b26b00;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { color: var(--ink); font-weight: 600; }
.logo:hover { text-decoration: none; }
.logo .brand { color: var(--muted); font-weight: 500; }
.inline { display: flex; gap: 12px; align-items: center; margin: 0; }
.badge { font-size: 12px; background: #eef2ff; color: var(--accent); padding: 2px 8px; border-radius: 99px; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
main { padding: 28px 20px 40px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 20px 0 8px; }
h3 { font-size: 15px; margin: 20px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
section.card { padding: 24px; }
.intro { margin-bottom: 20px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.product { display: flex; flex-direction: column; color: var(--ink); overflow: hidden;
  transition: box-shadow .15s, transform .15s; }
.product:hover { text-decoration: none; box-shadow: 0 6px 20px rgba(16,24,40,.08); transform: translateY(-2px); }
.thumb { position: relative; aspect-ratio: 4 / 3; background: #eef0f3; }
.thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumb .grade { position: absolute; top: 10px; left: 10px; }
.thumb .status { position: absolute; top: 10px; right: 10px; }
.body { padding: 14px 16px 16px; }
.product h2 { font-size: 16px; margin: 2px 0 6px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.category { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0; }
.headline { color: #3d4555; font-size: 14px; margin: 0 0 10px; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.headline.lead { font-size: 16px; -webkit-line-clamp: unset; }
.grade { display: inline-block; font-size: 12px; font-weight: 600; color: #fff; padding: 3px 9px; border-radius: 99px; background: var(--b); }
.grade-A { background: var(--a); } .grade-B { background: var(--b); } .grade-C { background: var(--c); }
.status { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 99px; background: #fff4e5; color: #8a4b00; }
.bands { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.band { background: var(--bg); border-radius: 8px; padding: 6px 10px; }
.band dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.band dd { margin: 0; font-weight: 600; font-size: 15px; }
.crumbs { margin: 0 0 16px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.detail .media { padding: 16px; }
.detail .media img { width: 100%; height: auto; display: block; }
.scoreline { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0 16px; color: var(--muted); font-size: 14px; }
.pillars { list-style: none; padding: 0; margin: 0 0 20px; }
.pillars li { display: grid; grid-template-columns: 150px 1fr 36px; gap: 10px; align-items: center; font-size: 14px; padding: 3px 0; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
.num { text-align: right; color: var(--muted); }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px;
  padding: 11px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { text-decoration: none; }
.btn[disabled] { background: #c7cdd8; cursor: not-allowed; }
.btn.secondary { background: #eef2ff; color: var(--accent); }
.owner-box { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.login { max-width: 380px; margin: 40px auto; }
.login label { display: block; font-size: 14px; margin: 16px 0 6px; }
.login input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; margin-bottom: 16px; }
.error { color: #b42318; background: #fef3f2; padding: 8px 12px; border-radius: 8px; }
.files { padding-left: 18px; }
.files li { margin: 4px 0; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.empty { text-align: center; color: var(--muted); }
.foot { color: var(--muted); font-size: 13px; padding-bottom: 32px; }
@media (max-width: 760px) {
  h1 { font-size: 22px; }
  .detail { grid-template-columns: 1fr; gap: 20px; }
  .pillars li { grid-template-columns: 110px 1fr 32px; }
}
