/* Compare page (uses tokens from theme.css; load after index.css) */
/* Everything is scoped to .cmp / .cmp-* except #faq and the .v-* / .s-* mini visuals, which only exist on this page. */

/* ---------- Tokens: short aliases for the theme.css colours (no new colours) ---------- */
.cmp {
  --g: var(--green);
  --gd: var(--green-d);
  --gl: var(--green-xl);
  --navy: var(--ink);
  --mut: var(--muted);
  --line: var(--rule);
}
.cmp * { box-sizing: border-box; }

/* ---------- Hero: same background, grid and card stack as the index hero (card base styles come from style.css/theme.css) ---------- */
.cmp-hero { background: linear-gradient(180deg,var(--tint) 0%,var(--paper) 100%); }
.cmp-hero h1 { margin: 14px 0 0; }
.cmp-hero__grid { display: grid; grid-template-columns: .9fr 1.2fr; gap: 56px; align-items: center; }
.cmp-hero .gb-head { max-width: none; }
.cmp-hero__vis { display: flex; justify-content: flex-end; }
.cmp-hero .scene { width: min(560px,100%); }
.cmp-hero .p0-row-right { flex-shrink: 0; }

/* ---------- Hero card: icons, larger ring and labels, clearer text ---------- */
.cmp-hero .p0-brand-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--green); }
.cmp-hero .p0-brand-icon .material-symbols-outlined { font-size: 19px; color: #fff; overflow: hidden; }
.cmp-hero .p0-brand-name { font-size: 15px; font-weight: 700; }
.cmp-hero .p0-hero { align-items: center; padding: 18px 18px 14px; }
.cmp-hero .p0-hero-label { font-size: 13.5px; font-weight: 600; color: var(--body); }
.cmp-hero .p0-hero-number { margin-top: 2px; line-height: 1.05; }
.cmp-hero .p0-hero-sub { font-size: 13.5px; margin-top: 6px; }
.cmp-hero .p0-hero-sub:empty { display: none; }
.cmp-hero .p0-hero-ring { width: 84px; height: 84px; }
.cmp-hero .ring-bg { stroke: var(--green-xl); }
.cmp-hero .p0-ring-label { gap: 1px; font-size: 14px; font-weight: 800; color: var(--green-d); }
.cmp-hero .p0-ring-label small { font-size: 10px; font-weight: 600; color: var(--muted); }
.cmp-hero .stack { height: 500px; }
.cmp-hero .p0-row-list { gap: 7px; }
.cmp-hero .p0-row-item { gap: 12px; padding: 9px 14px; }
.cmp-hero .p0-row-emoji {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 21px;
  color: var(--green-d);
  overflow: hidden;
}
.cmp-hero .p0-row-name { font-size: 14.5px; }
.cmp-hero .p0-row-meta { font-size: 13px; margin-top: 2px; }
.cmp-hero .p0-row-badge { font-size: 12.5px; padding: 3px 10px; }
.cmp-hero .p0-drawer-stat-label { letter-spacing: .06em; font-weight: 700; }
.cmp-sec { scroll-margin-top: 80px; }
#faq { scroll-margin-top: 80px; }

/* ---------- Spacing: tighter than the theme default (104px per section, 56px under headings) ---------- */
.cmp .gb-section { padding: 72px 0; }
.cmp .cmp-hero { padding-top: 124px !important; padding-bottom: 40px; }
.cmp .gb-head { margin-bottom: 32px; }
.cmp .cmp-hero .gb-head { margin-bottom: 0; }
.cmp-jump { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 10px; margin-top: 8px; }
.cmp-jump a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: box-shadow .2s,color .2s;
}
.cmp-jump a:hover { color: var(--gd); box-shadow: 0 0 0 1.5px var(--g); }
.cmp-jump .material-symbols-outlined { font-size: 18px; color: var(--g); }

/* ---------- Legend and status icons ---------- */
.cmp-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--mut);
}
.cmp-legend li { display: inline-flex; align-items: center; gap: 8px; }
.cmp-i {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex: none;
  font-style: normal;
}
.cmp-i::before { font-size: 14px; font-weight: 800; line-height: 1; }
.cmp-yes { background: var(--g); }
.cmp-yes::before { content: "✓"; color: #fff; }
.cmp-part { background: #fff4e0; box-shadow: inset 0 0 0 1.5px #f0b45a; }
.cmp-part::before { content: "◐"; color: #d08a1c; font-size: 13px; }
.cmp-no { background: #fdeceb; box-shadow: inset 0 0 0 1.5px #f2a59f; }
.cmp-no::before { content: "✕"; color: #d64235; font-size: 12px; }
.cmp-na { background: #f1f3f2; box-shadow: inset 0 0 0 1.5px #d6dcd8; }
.cmp-na::before { content: "–"; color: #8a958e; }

/* ---------- Comparison table ---------- */
.cmp-scroll {
  overflow-x: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line),0 24px 50px -30px rgba(16,37,26,.25);
}
.cmp-scroll:focus-visible { outline: 2px solid var(--g); outline-offset: 3px; }
.cmp-table { width: 100%; min-width: 900px; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.cmp-table th, .cmp-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #eef2ef;
  text-align: center;
  vertical-align: middle;
}
.cmp-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding: 20px 16px;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
}
.cmp-table th[scope=row], .cmp-table .cmp-feat {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 34%;
  text-align: left;
  background: #fff;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.cmp-table thead .cmp-feat {
  z-index: 3;
  color: var(--mut);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cmp-table td small {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--mut);
}
.cmp-table .cmp-gb { background: #f3faf3; width: 17%; }
.cmp-table thead .cmp-gb { background: #eaf6e9; box-shadow: inset 0 3px 0 var(--g); }
.cmp-table td.cmp-gb small { color: var(--gd); font-weight: 700; }
.cmp-logo { display: block; height: 22px; width: auto; margin: 0 auto; }
.cmp-group th {
  position: sticky;
  left: 0;
  padding: 12px 16px !important;
  background: #f7faf7 !important;
  text-align: left !important;
  font-size: 12.5px;
  font-weight: 800 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gd) !important;
}
.cmp-table tbody tr:not(.cmp-group):hover th, .cmp-table tbody tr:not(.cmp-group):hover td {
  background-color: #fafcfa;
}
.cmp-table tbody tr:not(.cmp-group):hover td.cmp-gb { background-color: #eaf6e9; }
.cmp-table tbody:last-child tr:last-child th, .cmp-table tbody:last-child tr:last-child td {
  border-bottom: 0;
}
.cmp-note { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--mut); }
.cmp-swipe { display: none; }

/* Desktop: the table fits, so drop the scroll box and keep the header row visible under the fixed navbar */
@media (min-width: 992px) {
  .cmp-scroll { overflow: visible; }
  .cmp-table thead th { top: 76px; }
  .cmp-table thead th:first-child { border-top-left-radius: 18px; }
  .cmp-table thead th:last-child { border-top-right-radius: 18px; }
  .cmp-table tbody:last-child tr:last-child th { border-bottom-left-radius: 18px; }
  .cmp-table tbody:last-child tr:last-child td:last-child { border-bottom-right-radius: 18px; }
}

/* ---------- "Where GeekyBooks is different" blocks ---------- */
.cmp-blocks { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; }
.cmp-block {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line),0 20px 40px -30px rgba(16,37,26,.3);
}
.cmp-block--wide { grid-column: 1/-1; flex-direction: row; align-items: center; }
.cmp-block--wide .cmp-btext, .cmp-block--wide .cmp-vis { flex: 1; }
.cmp-block .gb-pillar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cmp-block h3 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.25; }
.cmp-block p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.6; color: var(--mut); }
.cmp-block ul { margin: 14px 0 0; padding: 0; list-style: none; }
.cmp-block li {
  position: relative;
  padding: 6px 0 6px 26px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mut);
}
.cmp-block li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 7px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gl);
  color: var(--gd);
  font-size: 11px;
  font-weight: 800;
}
.cmp-block li b { color: var(--ink); }
.cmp-vis { margin-top: auto; }

/* ---------- Mini UI visuals inside the blocks ---------- */
.v-card {
  padding: 16px;
  border-radius: 14px;
  background: #f7faf8;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
}
.v-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  margin-top: 6px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px #edf1ee;
}
.v-hd { margin: 0 0 10px; background: none; box-shadow: none; padding: 0 2px; }
.v-hd b { font-size: 14.5px; color: var(--navy); }
.v-chip {
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--gl);
  color: var(--gd);
  font-size: 12px;
  font-weight: 800;
}
.v-chip--blue { background: #e7f0fb; color: #2563eb; }
.v-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 6px; }
.v-stats div { padding: 10px 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px #edf1ee; }
.v-stats small { display: block; font-size: 11.5px; color: var(--mut); }
.v-stats strong { display: block; margin-top: 4px; font-size: 16px; color: var(--ink); }
.v-bar {
  display: block;
  height: 8px;
  margin-top: 10px;
  border-radius: 4px;
  background: #e3ece5;
  overflow: hidden;
}
.v-bar i { display: block; width: 72%; height: 100%; border-radius: 4px; background: var(--g); }
.v-row em { font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.s-run { background: #e7f0fb; color: #2563eb; }
.s-done { background: var(--gl); color: var(--gd); }
.s-wait { background: #f1f3f2; color: #64748b; }
.s-rev { background: #fff4e0; color: #b4740f; }
.v-msg { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; }
.v-msg i {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  font-style: normal;
}
.v-msg p {
  margin: 0;
  padding: 9px 12px;
  border-radius: 4px 12px 12px 12px;
  background: #fff;
  box-shadow: 0 0 0 1px #edf1ee;
  font-size: 13.5px;
  color: var(--ink);
}
.v-me { flex-direction: column; align-items: flex-end; }
.v-me p { border-radius: 12px 4px 12px 12px; background: var(--gl); box-shadow: none; }
.v-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 0 0 1px #edf1ee;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
}
.v-file b, .v-conv b {
  padding: 2px 6px;
  border-radius: 5px;
  background: #fde8e8;
  color: #dc2626;
  font-size: 10.5px;
}
.v-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-top: 6px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px #edf1ee;
  color: var(--ink);
}
.v-check i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--g);
}
.v-check i::before { content: "✓"; color: #fff; font-size: 11px; font-weight: 800; font-style: normal; }
.v-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}
.v-toast span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--g);
  font-size: 12px;
}
.v-flow { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.v-flow:first-child { margin-top: 0; }
.v-flow span {
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px #edf1ee;
  font-weight: 700;
  color: var(--ink);
}
.v-flow i { width: 18px; height: 2px; background: #c5d3c8; position: relative; }
.v-flow i::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  border: 4px solid transparent;
  border-left: 5px solid #c5d3c8;
}
.v-flow .v-ok { background: var(--gl); color: var(--gd); box-shadow: none; }
.v-flow .v-pend { background: #fff4e0; color: #b4740f; box-shadow: none; }
.v-tools { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.v-tools--4 { grid-template-columns: repeat(4,1fr); }
.v-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px #edf1ee;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  min-width: 0;
}
.v-search .material-symbols-outlined { font-size: 20px; color: var(--g); }
.v-search__q { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-search em {
  margin-left: auto;
  flex-shrink: 0;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--gl);
  color: var(--gd);
}
.v-tools div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px #edf1ee;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}
.v-tools .material-symbols-outlined { font-size: 24px; color: var(--g); }
.v-conv {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px #edf1ee;
  font-weight: 700;
  color: var(--navy);
  font-size: 13px;
}
.v-conv em {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--gl);
  color: var(--gd);
}

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
  .cmp .cmp-hero { padding-top: 112px !important; }
  .cmp-hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .cmp-hero__vis { justify-content: center; }
  .cmp-block--wide { flex-direction: column; align-items: stretch; }
  .cmp-blocks { grid-template-columns: 1fr; }
}

/* ---------- Phone ---------- */
@media (max-width: 767px) {
  .cmp .gb-section { padding: 48px 0; }
  .cmp .cmp-hero { padding-top: 100px !important; padding-bottom: 32px; }
  .cmp .gb-head { margin-bottom: 24px; }
  .cmp .cmp-hero .gb-head { margin-bottom: 0; }
  .cmp-hero__vis { display: none; }
  .cmp-swipe {
    display: block;
    margin: 0 0 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--mut);
  }
  .cmp-table { min-width: 720px; font-size: 14px; }
  .cmp-table th[scope=row], .cmp-table .cmp-feat {
    width: 180px;
    min-width: 180px;
    box-shadow: 6px 0 10px -8px rgba(16,37,26,.25);
  }
  .cmp-table th, .cmp-table td { padding: 12px 10px; }
  .cmp-block { padding: 20px; }
  .v-tools--4 { grid-template-columns: repeat(2,1fr); }
  .v-stats { grid-template-columns: 1fr 1fr 1fr; }
}
