/* PalSingles - storefront styles
   Mobile-first. Breakpoints at 640px and 960px. */

:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1e222b;
  --border: #2a2f3a;
  --text: #e8eaed;
  --muted: #9aa3b2;
  --accent: #ff7a1a;
  --accent-dark: #e0650c;
  --ok: #35c07d;
  --warn: #f0b429;
  --err: #f0524d;

  --c-red: #e5484d;
  --c-green: #46a758;
  --c-blue: #3b82f6;
  --c-purple: #8e4ec6;
  --c-colorless: #8b97a8;

  --radius: 10px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 14px;
  min-height: 60px; flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 8px; margin-right: auto; }
.brand .name {
  font-weight: 800; font-size: 20px; letter-spacing: -0.02em;
  color: var(--text);
}
.brand .name .accent { color: var(--accent); }
.brand .tag { color: var(--muted); font-size: 12px; display: none; }
@media (min-width: 860px) { .brand .tag { display: inline; } }

.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--muted); padding: 7px 11px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--surface-2); }
.nav .cart-link { color: var(--text); }
.badge-count {
  background: var(--accent); color: #111; border-radius: 999px;
  padding: 1px 7px; font-size: 12px; font-weight: 800; margin-left: 4px;
}

/* ---------- layout ---------- */
main { padding: 22px 0 60px; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -0.02em; }
h2 { font-size: 19px; margin: 26px 0 12px; }
.sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }

.card-surface {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}

/* ---------- flash ---------- */
.flash {
  padding: 11px 14px; border-radius: var(--radius); margin-bottom: 16px;
  font-size: 14px; border: 1px solid;
}
.flash.success { background: rgba(53,192,125,.1); border-color: rgba(53,192,125,.4); color: #7de2ac; }
.flash.error   { background: rgba(240,82,77,.1);  border-color: rgba(240,82,77,.4);  color: #ff9b98; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, #1b2030, #121722 60%);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 26px 20px; margin-bottom: 26px;
}
.hero h1 { font-size: 28px; }
@media (min-width: 640px) { .hero { padding: 34px 30px; } .hero h1 { font-size: 34px; } }
.hero p { color: var(--muted); max-width: 60ch; margin: 8px 0 18px; }
.stat-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; }
.stat .n { font-size: 22px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; background: var(--accent); color: #17110a;
  font-weight: 700; font-size: 14px; padding: 10px 16px;
  border-radius: 8px; border: 0; cursor: pointer; text-align: center;
  font-family: inherit;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: #262b36; }
.btn.danger { background: transparent; color: var(--err); border: 1px solid rgba(240,82,77,.45); }
.btn.danger:hover { background: rgba(240,82,77,.12); }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- filters ---------- */
.layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 960px) { .layout { grid-template-columns: 250px 1fr; } }

.filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; }
.filters h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.fgroup { margin-bottom: 16px; }
.fgroup > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 14px; padding: 3px 0; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.range { display: flex; gap: 8px; align-items: center; }
.range input { width: 100%; }

input[type=text], input[type=email], input[type=number], input[type=password], input[type=url], select, textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 11px; font-size: 14px; font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(255,122,26,.5); outline-offset: 1px; border-color: var(--accent);
}
label.field { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
label.field span { display: block; margin-bottom: 5px; }
.field-error { color: var(--err); font-size: 12px; margin-top: 4px; font-weight: 500; }
.hint { color: var(--muted); font-size: 12px; font-weight: 400; }

/* ---------- card grid (image-led) ---------- */
/* Tiles lead with the card image: it is what buyers actually scan for, and it
   makes the whole tile a large click target instead of a small text link. */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }
}

.tile {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; text-decoration: none;
  color: inherit; transition: transform .12s ease, border-color .12s ease,
    box-shadow .12s ease;
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-3px); border-color: #4a5464;
  box-shadow: 0 8px 22px rgba(0,0,0,.45); text-decoration: none;
}
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tile-art {
  position: relative; aspect-ratio: 400 / 558; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
}
.tile-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-art-fallback {
  color: var(--muted); font-size: 12px; text-align: center; padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Price sits on the art so the eye finds it without extra text lines. */
.tile-badge {
  position: absolute; left: 8px; bottom: 8px;
  background: rgba(10,12,16,.88); color: #fff; font-weight: 800;
  font-size: 13px; padding: 3px 9px; border-radius: 999px;
  backdrop-filter: blur(3px);
}
.tile-variants {
  position: absolute; right: 8px; top: 8px;
  background: rgba(10,12,16,.82); color: var(--muted);
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em;
}

.tile-body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 5px; }
.tile-name {
  font-weight: 700; font-size: 13.5px; line-height: 1.3; color: var(--text);
  /* Two lines max, so a long name cannot make one tile taller than its row. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; margin-top: auto;
}
.tile .cnum {
  font-size: 11px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* A colour stripe reads faster than a text pill and costs no vertical space. */
.tile-color { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.tile-color.Red       { background: var(--c-red); }
.tile-color.Green     { background: var(--c-green); }
.tile-color.Blue      { background: var(--c-blue); }
.tile-color.Purple    { background: var(--c-purple); }
.tile-color.Colorless { background: var(--c-colorless); }

.pill {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--muted);
}
.pill.Red       { color: var(--c-red);       border-color: rgba(229,72,77,.45);  background: rgba(229,72,77,.1); }
.pill.Green     { color: var(--c-green);     border-color: rgba(70,167,88,.45);  background: rgba(70,167,88,.1); }
.pill.Blue      { color: var(--c-blue);      border-color: rgba(59,130,246,.45); background: rgba(59,130,246,.1); }
.pill.Purple    { color: var(--c-purple);    border-color: rgba(142,78,198,.45); background: rgba(142,78,198,.1); }
.pill.Colorless { color: var(--c-colorless); border-color: rgba(139,151,168,.4); background: rgba(139,151,168,.1); }
.pill.stock  { color: var(--ok);   border-color: rgba(53,192,125,.4); }
.pill.nostock{ color: var(--muted); }

/* ---------- card detail ---------- */
.breadcrumb { margin-bottom: 14px; }

.card-detail { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .card-detail { grid-template-columns: 330px 1fr; } }

.card-art-col { position: sticky; top: 76px; align-self: start; }
@media (max-width: 819px) { .card-art-col { position: static; } }

.card-art {
  aspect-ratio: 400 / 558; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card-art-placeholder {
  display: flex; flex-direction: column; gap: 8px; text-align: center;
  padding: 20px; color: var(--muted); font-size: 13px;
}
.card-art-placeholder strong { color: var(--text); font-size: 15px; }

/* ---------- variant switcher ---------- */
.variant-picker { margin-top: 12px; }
.variant-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 7px;
}
.variant-label .hint { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Horizontal strip: a card can have 6+ printings and they must all stay
   reachable on a phone without pushing the buy box off screen. */
.variant-strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px;
  scrollbar-width: thin;
}
.variant {
  position: relative; flex: 0 0 auto; width: 62px; padding: 0;
  aspect-ratio: 400 / 558; background: var(--surface-2); cursor: pointer;
  border: 2px solid var(--border); border-radius: 8px; overflow: hidden;
  transition: border-color .12s ease, transform .12s ease;
}
.variant img { width: 100%; height: 100%; object-fit: cover; display: block; }
.variant:hover { border-color: #5a6474; transform: translateY(-2px); }
.variant.is-active { border-color: var(--accent); }
.variant:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.variant-code {
  display: flex; align-items: center; justify-content: center; height: 100%;
  font-size: 10px; font-weight: 800; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
/* Green dot = this exact printing is in stock. */
.variant-dot {
  position: absolute; right: 4px; top: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--ok); border: 1.5px solid var(--surface);
}

.variant-info {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 11px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; font-size: 13px; min-height: 42px;
}
.variant-info-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; color: var(--muted);
}
.variant-info-price { font-weight: 800; font-size: 15px; margin-left: auto; }

/* ---------- stat chips ---------- */
.statline { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.stat-chip {
  display: flex; flex-direction: column; gap: 1px; padding: 7px 13px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
}
.stat-chip .k {
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 700;
}
.stat-chip .val { font-size: 17px; font-weight: 800; line-height: 1.1; }

.rules {
  background: var(--surface-2); border-left: 3px solid var(--accent);
  padding: 11px 14px; border-radius: 0 8px 8px 0; font-size: 14px;
  color: #d3d8e0; white-space: pre-wrap;
}

/* ---------- buy rows ---------- */
/* Rows rather than a table: on a phone a 6-column table forces a horizontal
   scroll exactly where the buy button needs to be. */
.buy-list { display: flex; flex-direction: column; gap: 9px; }
.buy-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 13px;
}
.buy-row:hover { border-color: #3a414f; }
.buy-meta { flex: 1 1 190px; min-width: 0; }
.buy-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.buy-cond { font-weight: 700; font-size: 14px; }
.buy-price { font-weight: 800; font-size: 18px; white-space: nowrap; }
.buy-form { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.buy-form input { width: 64px; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.status { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.status.paid, .status.active   { background: rgba(53,192,125,.15); color: var(--ok); }
.status.pending                { background: rgba(240,180,41,.15); color: var(--warn); }
.status.failed, .status.cancelled { background: rgba(240,82,77,.15); color: var(--err); }
.status.shipped                { background: rgba(59,130,246,.15); color: var(--c-blue); }
.status.sold_out, .status.hidden { background: var(--surface-2); color: var(--muted); }

/* ---------- cart / totals ---------- */
.totals { max-width: 340px; margin-left: auto; font-size: 15px; }
.totals .row { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .row.grand { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; font-weight: 800; font-size: 18px; }
.qty-form { display: flex; gap: 6px; align-items: center; }
.qty-form input { width: 66px; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }

/* ---------- pagination ---------- */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pager a, .pager span {
  padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border);
  font-size: 14px; color: var(--muted);
}
.pager .current { background: var(--accent); color: #17110a; border-color: var(--accent); font-weight: 700; }

/* ---------- admin ---------- */
.admin-bar { background: #241a10; border-bottom: 1px solid #3d2c19; }
.admin-bar .wrap { display: flex; gap: 6px; align-items: center; min-height: 46px; flex-wrap: wrap; }
.admin-bar a { color: #f5c99b; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 7px; }
.admin-bar a:hover, .admin-bar a.active { background: rgba(255,122,26,.15); text-decoration: none; }
.admin-bar .spacer { margin-left: auto; }

.login-page { max-width: 380px; margin: 70px auto; }
.kpi-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 24px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.kpi .n { font-size: 24px; font-weight: 800; }
.kpi .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.inline-form { display: inline; }
.actions { display: flex; gap: 5px; flex-wrap: wrap; }

.notice {
  background: rgba(240,180,41,.08); border: 1px solid rgba(240,180,41,.3);
  border-radius: var(--radius); padding: 12px 14px; font-size: 13px;
  color: #f5d492; margin-bottom: 18px;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 26px 0; margin-top: 50px; font-size: 13px; color: var(--muted);
}
.site-footer .cols { display: flex; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.disclaimer { font-size: 12px; line-height: 1.6; max-width: 65ch; margin-top: 14px; color: #778193; }

.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;
}

/* ---------- mass entry ---------- */
textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.6; resize: vertical; min-height: 180px;
}
details summary::-webkit-details-marker { color: var(--accent); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; background: var(--surface-2); padding: 1px 5px;
  border-radius: 4px; color: #cfd6e0;
}

/* ---------- packing slip ---------- */
.slip {
  background: #fff; color: #111; border-radius: 10px; padding: 26px;
  max-width: 760px; margin: 0 auto;
}
.slip-head { display: flex; justify-content: space-between; gap: 20px;
  border-bottom: 2px solid #111; padding-bottom: 14px; margin-bottom: 18px; }
.slip-brand { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.slip-order { font-size: 17px; font-weight: 800; font-family: ui-monospace, monospace; }
.slip-sub { font-size: 12px; color: #555; line-height: 1.5; margin-top: 4px; }
.slip-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: #777; margin-bottom: 4px; font-weight: 700; }
.slip-addr { display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  font-size: 13px; line-height: 1.6; margin-bottom: 22px; }
.slip-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 0; }
.slip-table th { text-align: left; border-bottom: 1px solid #111; padding: 7px 8px;
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #444; }
.slip-table td { padding: 8px; border-bottom: 1px solid #e6e6e6; vertical-align: top; }
.slip-table tbody tr:hover { background: transparent; }
.slip-table .mono { font-family: ui-monospace, monospace; font-size: 12px; color: #555; }
.slip-table .num { text-align: right; }
/* A box to tick as each card is pulled from the binder. */
.slip-table .tick::before {
  content: ''; display: inline-block; width: 13px; height: 13px;
  border: 1.5px solid #999; border-radius: 3px;
}
.slip-totals { margin: 16px 0 0 auto; max-width: 260px; font-size: 13px; }
.slip-totals > div { display: flex; justify-content: space-between; padding: 4px 8px; }
.slip-totals .grand { border-top: 1px solid #111; margin-top: 4px; padding-top: 8px;
  font-weight: 800; font-size: 15px; }
.slip-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid #e6e6e6;
  font-size: 11px; color: #666; line-height: 1.6; }

@media print {
  .site-header, .admin-bar, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .wrap { padding: 0; max-width: none; }
  .slip { border-radius: 0; padding: 0; max-width: none; }
  @page { margin: 14mm; }
}

/* Rarity checkboxes: two columns so ~14 rarities stay scannable. */
.rarity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.rarity-grid .check { font-size: 13px; }

/* Keyword badges inside rules text. The publisher marks these with icon
   placeholders we cannot reproduce, so they become typographic chips. */
.rules { line-height: 1.7; }
.kw {
  display: inline-block; background: rgba(255,122,26,.16);
  color: #ffb877; border: 1px solid rgba(255,122,26,.32);
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; padding: 1px 6px; border-radius: 4px;
  margin-right: 5px; vertical-align: 1px;
}
.cost-chip {
  display: inline-block; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 12px; font-weight: 600;
  padding: 0 6px; border-radius: 4px; margin: 0 2px;
}

/* ---------- collapsible filters (mobile) ---------- */
.filters-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 15px; padding: 2px 0;
}
.filters-summary::-webkit-details-marker { display: none; }
.filters-summary::after {
  content: '▾'; color: var(--accent); font-size: 13px; transition: transform .15s ease;
}
details[open] > .filters-summary::after { transform: rotate(180deg); }
details.filters[open] > .filters-summary { margin-bottom: 12px; }

@media (min-width: 960px) {
  /* Sidebar layout: the panel is always open and needs no toggle. */
  .filters-summary { display: none; }
}

/* ---------- eBay comps + collection controls ---------- */
.art-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.art-actions .btn { flex: 1 1 auto; }
.ebay-link { font-size: 12px; white-space: nowrap; }

.own-form {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  padding: 9px 11px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 9px;
}
.own-label { font-size: 12px; font-weight: 700; color: var(--muted); flex: 1 1 auto; }
.own-form input { width: 74px; flex: 0 0 auto; }

/* ---------- collection: set progress ---------- */
.set-progress-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.set-progress {
  position: relative; display: block; padding: 15px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; text-decoration: none; color: inherit;
  transition: border-color .12s ease, transform .12s ease;
}
.set-progress:hover { border-color: #4a5464; transform: translateY(-2px); text-decoration: none; }
.set-progress.is-complete { border-color: rgba(53,192,125,.5); }
.set-progress-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; margin-bottom: 11px;
}
.set-code { font-weight: 800; font-size: 16px; }
.set-name { font-size: 12px; color: var(--muted); margin-top: 2px; }
.set-pct { font-weight: 800; font-size: 20px; color: var(--accent); }
.set-progress.is-complete .set-pct { color: var(--ok); }

.progress-track {
  height: 7px; background: var(--surface-2); border-radius: 999px;
  overflow: hidden; border: 1px solid var(--border);
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), #ffab5e);
  border-radius: 999px; transition: width .3s ease;
}
.set-progress.is-complete .progress-fill { background: var(--ok); }
.set-progress-foot {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 8px; font-size: 12px; color: var(--muted);
}
.set-complete-badge {
  position: absolute; top: -8px; right: 12px; background: var(--ok);
  color: #06301c; font-size: 10px; font-weight: 800; padding: 2px 8px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: .05em;
}

/* ---------- collection: checklist ---------- */
.checklist { display: flex; flex-direction: column; gap: 8px; }
.check-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px;
}
/* Owned rows get a green edge so a long checklist scans at a glance. */
.check-row.is-owned { border-left: 3px solid var(--ok); }
/* Fixed box: a failed image must not let alt text expand the row to five
   lines and wreck a 200-row checklist. */
.check-thumb {
  flex: 0 0 auto; width: 42px; aspect-ratio: 400 / 558;
  border-radius: 5px; overflow: hidden; display: block;
  background: var(--surface-2); font-size: 0;
}
.check-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.check-meta { flex: 1 1 200px; min-width: 0; }
.check-name { font-weight: 700; font-size: 14px; color: var(--text); }
.check-name:hover { color: var(--accent); }
.check-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 3px; font-size: 12px; }
.check-form { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.check-form input { width: 68px; }

/* ---------- federated sign-in ---------- */
/* Google's brand guidelines: white surface, their mark, clear wording. */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; background: #fff; color: #1f1f1f;
  font-family: inherit; font-size: 14px; font-weight: 700;
  padding: 11px 16px; border: 1px solid #dadce0; border-radius: 8px;
  text-decoration: none; cursor: pointer; transition: background .12s ease;
}
.btn-google:hover { background: #f5f5f5; text-decoration: none; color: #1f1f1f; }
.btn-google:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-google svg { flex: 0 0 auto; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: .08em;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ---------------------------------------------------------------------------
   Policy pages
   ---------------------------------------------------------------------------
   Long-form prose. Constrained to a readable measure rather than the full
   1180px wrap, because a legal paragraph set that wide is genuinely hard to
   track from one line to the next. */

.prose { max-width: 68ch; }

.prose h1 { margin: 0 0 6px; }

.prose h2 {
  margin: 32px 0 10px;
  font-size: 17px;
  letter-spacing: -0.01em;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.prose p,
.prose li { line-height: 1.65; color: var(--text); }

.prose p { margin: 0 0 14px; }

.prose ul,
.prose ol { margin: 0 0 16px; padding-left: 22px; }

.prose li { margin-bottom: 7px; }

.prose a { color: var(--accent); }

.prose code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 13px;
}

/* Opening statement of intent, a shade larger than body copy. */
.prose .lede { font-size: 16px; color: var(--text); }

/* Set-apart caveat, e.g. "none of this limits your statutory rights". */
.prose .note {
  margin-top: 26px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
}

/* Postal address, straight from the env value, so honour its line breaks. */
.prose .addr { white-space: pre-line; }

@media (max-width: 640px) {
  .prose h2 { margin-top: 26px; }
}
