/* ── MRKT → COMPETITION (Zai 2026-10-11) ──────────────────────────────────────────────────────
   Pages saved from SEO Lens: categories → sites → dates → what SEO Lens saw that day.
   Sits inside .seo-wrap, so it inherits the width, lining numbers and the app's theme tokens. */
.cmp { --cmp-hair: color-mix(in srgb, var(--line) 70%, transparent); padding-bottom: 90px; }
.cmp button { font-family: inherit; }

/* Breadcrumb: every step back is one tap */
.cmp-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; padding: 16px 16px 2px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.cmp-crumbs button { background: none; border: 0; padding: 4px 2px; font-size: inherit; font-weight: inherit;
  letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; max-width: 46vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-crumbs button:hover { color: var(--gold); }
.cmp-crumbs .now { color: var(--ink); padding: 4px 2px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-crumbs i { font-size: 12px; opacity: .55; }

.cmp-head { display: flex; align-items: center; gap: 12px; padding: 4px 16px 6px; }
.cmp-head .ic { flex: none; }
.cmp-head .tx { min-width: 0; }
.cmp-title { font-size: 21px; font-weight: 800; color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }
.cmp-title.caps { font-size: 18px; letter-spacing: .14em; padding-top: 14px; }
.cmp-sub { font-size: 12px; color: var(--ink-soft); margin-top: 3px; overflow-wrap: anywhere; }
.cmp-sub a { color: var(--gold); text-decoration: none; }
.cmp-actions { margin-left: auto; display: flex; gap: 8px; flex: none; align-self: flex-start; padding-top: 2px; }

.cmp-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.cmp-btn i { font-size: 14px; }
.cmp-btn:hover { color: var(--gold); border-color: var(--gold); }
.cmp-btn.danger:hover { color: var(--clay); border-color: var(--clay); }
.cmp-btn.solid { background: var(--gold); border-color: var(--gold); color: #0d0d0d; }
.cmp-btn.solid:hover { color: #0d0d0d; filter: brightness(1.08); }
.cmp-btn:disabled { opacity: .5; cursor: default; }

/* Inline name box (new category / rename) */
.cmp-form { display: flex; gap: 8px; align-items: center; margin: 10px 16px 0; padding: 10px; border: 1px solid var(--gold);
  border-radius: 13px; background: var(--card); }
.cmp-form input, .cmp-select { flex: 1; min-width: 0; background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; }
.cmp-form input:focus, .cmp-select:focus { outline: none; border-color: var(--gold); }
.cmp-select { flex: none; width: auto; font-size: 12px; padding: 6px 8px; }

/* Home: one card per category */
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; padding: 10px 16px 0; }
.cmp-cat { display: flex; flex-direction: column; gap: 12px; text-align: left; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 13px; padding: 14px; cursor: pointer; transition: border-color .15s; }
.cmp-cat:hover { border-color: var(--gold); }
.cmp-cat .n { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; }
.cmp-cat .n i { margin-left: auto; color: var(--ink-soft); font-size: 16px; }
.cmp-cat .m { font-size: 11.5px; color: var(--ink-soft); }
.cmp-cat .foot { display: flex; align-items: center; gap: 10px; }
.cmp-favs { display: flex; padding-left: 6px; }
.cmp-favs .cmp-fav { width: 24px; height: 24px; border-radius: 7px; margin-left: -6px; border: 2px solid var(--card); }

/* Favicon with a letter behind it, for sites whose icon won't load */
.cmp-fav { position: relative; display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px;
  background: var(--paper-warm); color: var(--ink-soft); font-size: 13px; font-weight: 800; text-transform: uppercase; overflow: hidden; }
/* Light grey, not white: white logos (AZNA's own owl) vanish on white, dark ones vanish on the dark card */
.cmp-fav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #e4e4e8; padding: 3px; }
.cmp-favs .cmp-fav { font-size: 10px; }
.cmp-favs .cmp-fav img { padding: 2px; }
.cmp-fav.lg { width: 44px; height: 44px; border-radius: 11px; font-size: 17px; }

/* Card + rows (same family as the SEO page's .ssp cards) */
.cmp-card { margin: 10px 16px 0; border: 1px solid var(--line); border-radius: 13px; background: var(--card); overflow: hidden; }
.cmp-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 8px;
  font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.cmp-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%;
  padding: 11px 14px; border: 0; border-top: 1px solid var(--cmp-hair); background: none; color: var(--ink);
  text-align: left; cursor: pointer; }
.cmp-row:hover { background: color-mix(in srgb, var(--gold) 5%, transparent); }
.cmp-row > i { color: var(--ink-soft); font-size: 16px; }
.cmp-row .nm { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-row .mt { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Site page: one row per save */
.cmp-save { grid-template-columns: 92px minmax(0, 1fr) auto; align-items: start; }
.cmp-save .dt { font-size: 13px; font-weight: 800; line-height: 1.3; }
.cmp-save .dt small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-soft); }
.cmp-save .pg { font-size: 11px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-save .nm { font-weight: 600; font-size: 13.5px; }
.cmp-save > i { align-self: center; }
.cmp-chg { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.cmp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700;
  background: color-mix(in srgb, var(--ink-soft) 16%, transparent); color: var(--ink-soft); white-space: nowrap; }
.cmp-chip.up { background: rgba(70,201,126,.13); color: #46c97e; }
.cmp-chip.down { background: rgba(229,72,77,.13); color: #e5484d; }
.cmp-chip.new { background: color-mix(in srgb, var(--gold) 15%, transparent); color: var(--gold); }
.cmp-chip.warn { background: rgba(224,166,58,.14); color: #e0a63a; }
.cmp-chip.bad { background: rgba(229,72,77,.13); color: #e5484d; }
html[data-theme="light"] .cmp-chip.up { color: #23864f; }
html[data-theme="light"] .cmp-chip.warn { color: #a86d0a; }

/* Snapshot page */
.cmp-tabs { justify-content: flex-start; padding: 10px 16px 2px; }
.cmp-stats { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.cmp-stat { padding: 10px 12px; min-width: 0; text-align: center; }
.cmp-stat + .cmp-stat { border-left: 1px solid var(--cmp-hair); }
.cmp-stat .l { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; white-space: nowrap; }
.cmp-stat .v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.cmp-stat .v.zero { color: var(--ink-soft); font-weight: 600; }
.cmp-kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 4px 16px; padding: 11px 14px; border-top: 1px solid var(--cmp-hair); }
.cmp-card-h + .cmp-kv { border-top: 0; }
.cmp-kv .k { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; padding-top: 2px; }
.cmp-kv .k.raw { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; padding-top: 1px; overflow-wrap: anywhere; }
.cmp-kv .v { font-size: 13.5px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.cmp-kv .v .none { color: var(--ink-soft); font-style: italic; }
.cmp-kv .v .len { display: block; font-size: 11.5px; color: var(--gold); margin-top: 3px; }
.cmp-kv .v .len.warn { color: #e0a63a; }
.cmp-kv .v .was { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 3px; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-soft) 60%, transparent); }
.cmp a.u { color: var(--gold); text-decoration: none; overflow-wrap: anywhere; }
.cmp a.u:hover { text-decoration: underline; }
.cmp-empty { padding: 18px 14px; font-size: 12.5px; color: var(--ink-soft); text-align: center; line-height: 1.6; }

/* Headings outline */
.cmp-h { display: flex; gap: 10px; align-items: baseline; padding: 8px 14px; border-top: 1px solid var(--cmp-hair); font-size: 13.5px; }
.cmp-h b { flex: none; width: 26px; font-size: 11.5px; font-weight: 800; }
.cmp-h span { min-width: 0; overflow-wrap: anywhere; }
.cmp-h.hid span { color: var(--ink-soft); }
.cmp-h.l3 { padding-left: 32px; } .cmp-h.l4 { padding-left: 50px; } .cmp-h.l5 { padding-left: 68px; } .cmp-h.l6 { padding-left: 86px; }
.cmp .h1 { color: #6f8dff; } .cmp .h2 { color: #ff6b6b; } .cmp .h3 { color: #b98cff; }
.cmp .h4 { color: #c3d34a; } .cmp .h5 { color: #4fd08a; } .cmp .h6 { color: #ff6fa5; }
html[data-theme="light"] .cmp .h1 { color: #3b6cf6; } html[data-theme="light"] .cmp .h2 { color: #e5484d; }
html[data-theme="light"] .cmp .h3 { color: #8e4ec6; } html[data-theme="light"] .cmp .h4 { color: #7d8f12; }
html[data-theme="light"] .cmp .h5 { color: #30a46c; } html[data-theme="light"] .cmp .h6 { color: #e93d82; }

/* Filter row inside a card (keywords / links) */
.cmp-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--cmp-hair); }
.cmp-tools .sp { flex: 1; }
.cmp-pill { background: none; border: 1px solid var(--line); color: var(--ink-soft); border-radius: 100px; padding: 5px 11px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; cursor: pointer; white-space: nowrap; }
.cmp-pill.on { color: var(--gold); border-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.cmp-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); cursor: pointer; }
.cmp-check input { margin: 0; accent-color: var(--gold); }

/* Tables (keywords, links, images) */
.cmp-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp-tbl th { text-align: left; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700;
  padding: 8px 14px; border-top: 1px solid var(--cmp-hair); }
.cmp-tbl td { padding: 8px 14px; border-top: 1px solid var(--cmp-hair); vertical-align: middle; overflow-wrap: anywhere; }
.cmp-tbl .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cmp-tbl .sub { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.cmp-tbl .cmp-chip { margin-left: 6px; vertical-align: 1px; }
.cmp-thumb { display: block; width: 72px; height: 54px; object-fit: contain; border-radius: 6px; background: var(--paper-warm); }
.cmp-dims { font-size: 10.5px; color: var(--ink-soft); margin-top: 3px; white-space: nowrap; }
.cmp-miss { color: #e0a63a; font-weight: 700; }
.cmp-more { padding: 10px 14px; font-size: 11.5px; color: var(--ink-soft); text-align: center; border-top: 1px solid var(--cmp-hair); }

/* Social share preview */
.cmp-share { display: flex; margin: 0 14px 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.cmp-share img { width: 200px; height: 128px; object-fit: cover; flex: none; background: var(--paper-warm); }
.cmp-share .b { padding: 11px 13px; min-width: 0; }
.cmp-share .s { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.cmp-share .t { font-size: 14px; font-weight: 700; margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmp-share .d { font-size: 12px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmp-kv .v img.wide { display: block; max-width: 100%; max-height: 160px; border-radius: 8px; margin-top: 6px; background: var(--paper-warm); }

/* "How to save" steps on an empty board */
.cmp-how { padding: 6px 14px 14px; font-size: 13px; color: var(--ink-soft); line-height: 1.7; }
.cmp-how ol { margin: 4px 0 0; padding-left: 20px; }
.cmp-how b { color: var(--ink); }
.cmp-foot { display: flex; justify-content: center; padding: 18px 16px 0; }

@media (max-width: 640px) {
  .cmp-crumbs { padding: 12px 10px 2px; }
  .cmp-head { padding: 4px 10px 6px; flex-wrap: wrap; }
  .cmp-head .tx { flex: 1 1 0; }
  .cmp-title { font-size: 19px; }
  .cmp-fav.lg { width: 38px; height: 38px; border-radius: 10px; font-size: 15px; }
  .cmp-actions { margin-left: 0; width: 100%; }
  .cmp-grid { padding: 8px 10px 0; grid-template-columns: 1fr; }
  .cmp-card, .cmp-form { margin: 8px 10px 0; }
  .cmp-tabs { padding: 8px 10px 2px; }
  .cmp-kv { grid-template-columns: 1fr; gap: 3px; }
  .cmp-save { grid-template-columns: 74px minmax(0, 1fr) auto; gap: 10px; }
  .cmp-stat .v { font-size: 17px; }
  .cmp-stats.c6 { --n: 3 !important; }
  .cmp-stats.c6 .cmp-stat:nth-child(4) { border-left: 0; }
  .cmp-stats.c6 .cmp-stat:nth-child(n+4) { border-top: 1px solid var(--cmp-hair); }
  .cmp-share { flex-direction: column; }
  .cmp-share img { width: 100%; height: 160px; }
  .cmp-tbl th, .cmp-tbl td { padding: 8px 10px; }
  .cmp-thumb { width: 56px; height: 42px; }
}
