/* ─────────────────────────────────────────
   Compare pages: /compare/ hub and /compare/smart-inventory-vs-<target>/.

   Layered on top of subpage-shared.css (which imports design-tokens.css) and
   for-pages.css. Only styles the pieces compare pages add: the "last checked"
   hero pill, side-by-side cards, source chips, hub cards, "How we compare"
   rules, sources/trademark note, and per-row phone cards.

   Tokens only in every component rule; dark mode follows prefers-color-scheme
   using the design-tokens.css dark palette.
───────────────────────────────────────── */

:root {
  --cmp-ink: var(--ink);
  --cmp-ink-2: var(--ink2);
  --cmp-ink-3: var(--ink3);
  --cmp-surface: var(--surface);
  --cmp-surface-2: var(--surface2);
  --cmp-chip-bg: var(--bg);
  --cmp-border: var(--border-strong);
  --cmp-accent: var(--blue-text);
  --cmp-on-accent: var(--on-blue-text);
  --cmp-pill-ink: rgba(255, 255, 255, 0.88);
  --cmp-pill-border: rgba(255, 255, 255, 0.25);
  --cmp-pill-icon: rgba(255, 255, 255, 0.8);
}

@media (prefers-color-scheme: dark) {
  :root {
    --cmp-ink: #F5F8FF;
    --cmp-ink-2: rgba(245, 248, 255, 0.82);
    --cmp-ink-3: rgba(245, 248, 255, 0.62);
    --cmp-surface: #18223F;
    --cmp-surface-2: #24304F;
    --cmp-chip-bg: #131C36;
    --cmp-border: rgba(255, 255, 255, 0.11);
    --cmp-accent: #7AA7FF;
    --cmp-on-accent: #18223F;
  }
}

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

/* ── HERO "LAST CHECKED" PILL ─────────────────────────── */
.cmp-checked {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cmp-pill-ink);
  border: 1px solid var(--cmp-pill-border);
  border-radius: var(--r-full);
  padding: 5px var(--s-3);
}
.cmp-checked-icon {
  width: 11px;
  height: 10px;
  border: 1.5px solid var(--cmp-pill-icon);
  border-top-width: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── WINS ("Where Smart Inventory stands out") ─────────── */
.cmp-wins {
  background: var(--cmp-surface);
  border: 1px solid var(--cmp-border);
  border-radius: 14px;
  padding: 18px var(--s-5);
}
.cmp-wins h2 {
  margin: 0 0 12px;
}
.cmp-wins-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmp-wins-list li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--cmp-ink-2);
  padding-left: 18px;
  position: relative;
}
.cmp-wins-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--cmp-accent);
}
.cmp-wins-list strong {
  color: var(--cmp-ink);
  font-weight: 700;
}

/* ── TWO-COLUMN CARDS ("Who each is for", "Which to pick") ── */
.cmp-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cmp-card {
  background: var(--cmp-surface);
  border: 1px solid var(--cmp-border);
  border-radius: 14px;
  padding: 18px var(--s-5);
}
.cmp-card h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cmp-ink);
  margin: 0 0 8px;
}
.cmp-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cmp-ink-2);
}

/* Checkmark list inside "Pick ... if" cards */
.cmp-check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.cmp-check-list li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--cmp-ink-2);
}
.cmp-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cmp-accent);
}
.cmp-check-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  width: 5px;
  height: 8px;
  border: solid var(--cmp-on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── COMPARISON TABLE + SOURCE CHIP ───────────────────── */
.for-table-wrap.cmp-table-wrap {
  background: var(--cmp-surface);
  border-color: var(--cmp-border);
}
.for-table.cmp-table {
  min-width: 0;
}
.for-table.cmp-table thead th {
  background: var(--cmp-surface-2);
  color: var(--cmp-ink-3);
  border-bottom-color: var(--cmp-border);
}
.for-table.cmp-table tbody th {
  color: var(--cmp-ink);
  border-bottom-color: var(--cmp-border);
}
.for-table.cmp-table tbody td {
  color: var(--cmp-ink-2);
  border-bottom-color: var(--cmp-border);
}
.cmp-src-wrap {
  display: block;
  margin-top: 6px;
}
.cmp-src {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--cmp-accent);
  background: var(--cmp-chip-bg);
  border-radius: 6px;
  padding: 2px 7px;
  text-decoration: none;
  /* long chips ("sortly.com/pricing · 19 Kasım 2026'da kontrol edildi") wrap
     inside narrow table and phone cells instead of spilling out */
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
  box-sizing: border-box;
}
.cmp-src:hover {
  text-decoration: underline;
}
.cmp-src:focus-visible {
  outline: 2px solid var(--cmp-accent);
  outline-offset: 2px;
}
.cmp-col-src {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cmp-ink-3);
  margin-top: 10px;
}

/* ── HUB CARDS ────────────────────────────────────────── */
.cmp-hub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cmp-hub-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  background: var(--cmp-surface);
  border: 1px solid var(--cmp-border);
  border-radius: 14px;
  padding: var(--s-5);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.cmp-hub-card:hover {
  border-color: var(--cmp-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.cmp-hub-card:focus-visible {
  outline: 2px solid var(--cmp-accent);
  outline-offset: 2px;
  text-decoration: none;
}
.cmp-hub-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cmp-ink);
}
.cmp-hub-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--cmp-ink-2);
}
.cmp-hub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px var(--s-4);
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cmp-ink-3);
}
.cmp-hub-go {
  white-space: nowrap;
  color: var(--cmp-accent);
  font-family: var(--font-sans);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 600;
}

/* ── HUB "HOW WE COMPARE" RULES ───────────────────────── */
.cmp-rules {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px var(--s-4);
}
.cmp-rules li {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--cmp-ink-2);
  padding-left: 22px;
  position: relative;
}
.cmp-rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--cmp-accent);
}

/* ── SOURCES, CORRECTIONS & TRADEMARK NOTE ────────────── */
.cmp-note {
  margin-top: 32px;
  border-radius: 14px;
  padding: 18px var(--s-5);
  background: var(--cmp-chip-bg);
  border: 1px solid var(--cmp-border);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--cmp-ink-3);
}
.cmp-note p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--cmp-ink-3);
  margin: 0;
}
.cmp-note p + p {
  margin-top: var(--s-3);
}
.cmp-note strong {
  color: var(--cmp-ink);
}
.cmp-note a {
  color: var(--cmp-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── PHONE: STACKED CARDS + PER-ROW COMPARISON CARDS ──── */
@media (max-width: 600px) {
  .cmp-two,
  .cmp-hub,
  .cmp-rules {
    grid-template-columns: 1fr;
  }
  .for-table-wrap.cmp-table-wrap {
    background: transparent;
    border: 0;
  }
  .for-table.cmp-table tbody tr {
    background: var(--cmp-surface);
    border: 1px solid var(--cmp-border);
    border-radius: 14px;
    overflow: hidden;
    padding: 0;
    margin-bottom: 10px;
  }
  .for-table.cmp-table tbody tr:last-child {
    margin-bottom: 0;
  }
  .for-table.cmp-table tbody th,
  .for-table.cmp-table tbody tr:last-child th {
    background: var(--cmp-surface-2);
    color: var(--cmp-ink);
    padding: var(--s-3) 14px;
    font-size: 15px;
    font-weight: 700;
    border-bottom: 0;
  }
  .for-table.cmp-table tbody td,
  .for-table.cmp-table tbody tr:last-child td {
    padding: 10px 14px;
    border-top: 1px solid var(--cmp-border);
    border-bottom: 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--cmp-ink-2);
  }
  .for-table.cmp-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cmp-ink-3);
    margin-bottom: 2px;
  }
}

/* ── RELATED COMPARISONS (vs pages, before final CTA) ── */
.cmp-related {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s-6) var(--s-4) var(--s-5);
}
.cmp-related h2 {
  margin: 0 0 var(--s-3);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cmp-ink);
}
.cmp-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
}
.cmp-related a {
  color: var(--cmp-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 0.95rem;
}
.cmp-related a:hover {
  color: var(--cmp-ink);
}
