/* compare.css — shared styling for the comparison / "vs" content pages
   (note500-vs-*.html, best-free-trading-journal.html, best-trading-journals.html).
   Loaded AFTER site.css (which owns the header/brand/footer) and AFTER each
   page's own <style> block, so it may safely define the page-specific content
   components below. Page <style> blocks keep only their own layout tokens.

   Light-surface pages, but the product screenshots are dark-themed — hence
   .figure wraps every shot in dark browser chrome so it reads as a deliberate
   framed artifact rather than a contrast accident. */

/* ── Typography & rhythm ───────────────────────────────────────────────
   These pages are long-form reading, so the base scale is bumped above the
   site default and the vertical rhythm opened up. Declared here (loaded after
   each page's own <style>) so all five comparison pages move together. */
.wrap { max-width: 900px; }
main.wrap { font-size: 17.5px; line-height: 1.68; }
main.wrap h1 { font-size: 42px; line-height: 1.13; margin: 56px 0 18px;
                letter-spacing: -.025em; }
main.wrap .lede { font-size: 20px; line-height: 1.58; margin-bottom: 32px; }
main.wrap h2 { font-size: 27px; line-height: 1.25; margin: 56px 0 16px;
                letter-spacing: -.018em; }
main.wrap h3 { font-size: 20px; line-height: 1.35; margin: 32px 0 10px; }
main.wrap p { margin-bottom: 18px; }
main.wrap ul, main.wrap ol { margin: 0 0 18px 24px; }
main.wrap li { margin-bottom: 11px; }
main.wrap .note { font-size: 15px; line-height: 1.6; }
main.wrap .cta { font-size: 16.5px; padding: 15px 34px; margin: 16px 0 46px; }

/* ── At-a-glance verdict box (top of page, above the fold) ─────────────── */
.glance {
  background: #fff; border: 1px solid #E5E7EB; border-radius: 16px;
  padding: 22px 24px; margin: 24px 0 30px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.glance h2 { margin-top: 0 !important; font-size: 17px !important; }
.glance-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-top: 6px; }
.glance-col { min-width: 0; }
.glance-col h3 {
  font-family: var(--font-display); font-size: 14px; margin: 0 0 8px;
  text-transform: uppercase; letter-spacing: .06em; color: #6B7280;
}
.glance-col ul { margin: 0 0 0 18px; }
.glance-col li { margin-bottom: 6px; font-size: 15px; }
.glance-verdict {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid #EEF1F5;
  font-size: 15px;
}
.glance-verdict b { font-family: var(--font-display); }

/* ── Screenshot figures (dark chrome around dark product shots) ────────── */
.figure { margin: 22px 0 26px; }
.figure .chrome {
  background: #12161C; border: 1px solid #222932; border-radius: 12px;
  overflow: hidden; box-shadow: 0 10px 30px rgba(16,24,40,.14);
}
.figure .bar {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; background: #171C24; border-bottom: 1px solid #222932;
}
.figure .bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #2C333D; }
.figure .bar .lbl {
  margin-left: 8px; font-size: 11.5px; color: #7A8598;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em;
}
.figure img { display: block; width: 100%; height: auto; }
.figure figcaption {
  font-size: 13.5px; color: #6B7280; margin-top: 10px; line-height: 1.5;
}

/* ── Feature deep-dive blocks ──────────────────────────────────────────── */
.deep { margin: 30px 0; }
.deep h3 {
  font-family: var(--font-display); font-size: 18px; margin: 0 0 8px;
  letter-spacing: -.01em;
}
.deep .who {
  font-size: 13px; color: #16A34A; font-weight: 600; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .05em;
}

/* ── Persona recommendation cards ──────────────────────────────────────── */
.personas { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin: 20px 0 28px; }
.persona {
  background: #fff; border: 1px solid #E5E7EB; border-radius: 14px;
  padding: 18px 20px;
}
.persona h3 {
  font-family: var(--font-display); font-size: 15px; margin: 0 0 8px;
}
.persona p { font-size: 14.5px; margin: 0; color: #4B5563; line-height: 1.55; }
.persona .pick {
  display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600;
  padding: 4px 11px; border-radius: 999px;
}
.persona .pick.us { background: #ECFDF3; color: #15803D; }
.persona .pick.them { background: #F3F4F6; color: #4B5563; }

/* ── Honest "where they win" callout ───────────────────────────────────── */
.concede {
  background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 14px;
  padding: 18px 20px; margin: 22px 0;
}
.concede h3 {
  font-family: var(--font-display); font-size: 15px; margin: 0 0 8px; color: #92400E;
}
.concede p { margin-bottom: 0; font-size: 15px; color: #78350F; }
.concede p + p { margin-top: 10px; }

/* ── FAQ (visible copy that mirrors the JSON-LD) ───────────────────────── */
.faq { margin: 26px 0 10px; }
.faq details {
  background: #fff; border: 1px solid #E5E7EB; border-radius: 12px;
  padding: 14px 18px; margin-bottom: 10px;
}
.faq details[open] { border-color: #D1D5DB; }
.faq summary {
  font-family: var(--font-display); font-size: 15.5px; font-weight: 600;
  cursor: pointer; list-style: none; position: relative; padding-right: 26px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: -2px;
  font-size: 20px; font-weight: 400; color: #9CA3AF; line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 10px 0 0; font-size: 15px; color: #4B5563; line-height: 1.6; }

/* ── Cross-page navigation strip ───────────────────────────────────────── */
.crossnav {
  display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0 34px;
}
.crossnav a {
  font-size: 14px; font-weight: 500; text-decoration: none;
  padding: 8px 15px; border-radius: 999px;
  background: #fff; border: 1px solid #E5E7EB; color: #374151;
}
.crossnav a:hover { border-color: #22C55E; color: #15803D; }

/* ── Methodology / freshness note ──────────────────────────────────────── */
.method {
  background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 12px;
  padding: 15px 18px; margin: 26px 0 10px; font-size: 13.5px; color: #6B7280;
  line-height: 1.6;
}
.method b { color: #374151; font-family: var(--font-display); }

/* ── Table refinements shared by all comparison tables ─────────────────── */
main.wrap table { font-size: 16px; }
main.wrap th, main.wrap td { padding: 14px 16px; line-height: 1.5; }
table .rowhead { font-weight: 600; color: #111827 !important; }
td .sub { display: block; font-size: 14px; color: #9CA3AF; margin-top: 4px;
          line-height: 1.45; }

/* ── The full feature matrix ───────────────────────────────────────────────
   60+ rows grouped into categories. Breaks out of the 900px text column to
   use available width, scrolls horizontally inside its own container, and
   keeps the header row + feature-name column pinned while you scroll. */
.matrix-wrap {
  margin: 26px 0 14px;
  overflow: auto;                 /* both axes; sticky needs a scroll parent */
  max-height: 78vh;
  border: 1px solid #E5E7EB; border-radius: 16px; background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  overscroll-behavior: contain;
}
/* Widen past the prose column on roomy viewports, staying centred. */
@media (min-width: 1120px) {
  .matrix-wrap { width: min(1180px, calc(100vw - 48px));
                 margin-left: calc(50% - min(590px, calc(50vw - 24px)));
                 margin-right: 0; }
}
/* border-collapse MUST stay `separate`: with `collapse`, Chromium/Safari drop
   the borders on position:sticky cells and the sticky thead itself misbehaves.
   Because separate borders don't merge, each cell paints only its own
   bottom/right edge — hence the explicit border rules below. */
/* `overflow: visible` is LOAD-BEARING: each page's own `table { overflow:
   hidden }` rule (there for rounded corners) would otherwise make the table its
   own scroll container, which silently breaks every sticky cell inside it. The
   rounded corners live on .matrix-wrap instead. */
.matrix { width: 100%; min-width: 720px; border-collapse: separate;
          border-spacing: 0; border: 0; border-radius: 0; font-size: 15.5px;
          overflow: visible; }
.matrix th, .matrix td {
  padding: 13px 16px; text-align: left; vertical-align: top;
  border-bottom: 1px solid #EEF1F5; background: #fff;
}
/* Header row: pinned to the top of the scroll box.
   `top: -1px` closes the sub-pixel seam that lets a row peek above the header
   while scrolling. The sticky element must be the <th> (not <thead>), which is
   why every header cell carries its own background — a transparent one would
   let rows scroll through it. */
.matrix thead th {
  position: sticky; top: -1px; z-index: 3;
  background: #F9FAFB; border-bottom: 2px solid #E5E7EB;
  box-shadow: 0 1px 0 #E5E7EB;
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  white-space: nowrap;
}
.matrix thead th.us { color: #15803D; }
/* Feature-name column: pinned to the left */
.matrix tbody th {
  position: sticky; left: 0; z-index: 2;
  font-weight: 500; font-family: var(--font-sans); font-size: 15.5px;
  color: #111827; min-width: 236px; max-width: 320px;
  border-right: 1px solid #EEF1F5;
}
.matrix thead th:first-child {
  position: sticky; left: 0; z-index: 4; border-right: 1px solid #E5E7EB;
}
.matrix tbody th .sub {
  display: block; font-size: 13.5px; color: #9CA3AF; margin-top: 3px;
  font-weight: 400; line-height: 1.45;
}
/* Category divider rows */
.matrix tr.cat th {
  background: #F3F4F6; color: #374151; z-index: 2;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  padding: 11px 16px; border-bottom: 1px solid #E5E7EB;
}
.matrix tr.cat th:first-child { position: sticky; left: 0; z-index: 3; }
.matrix td { color: #4B5563; }
.matrix td.yes { color: var(--green, #16A34A); font-weight: 600; }
.matrix td.no  { color: #B6BCC6; }
.matrix td.part { color: #B45309; }
.matrix tbody tr:hover td, .matrix tbody tr:hover th { background: #FCFDFE; }
.matrix tbody tr.cat:hover th { background: #F3F4F6; }
.matrix-legend {
  font-size: 14px; color: #6B7280; margin: 0 0 26px; line-height: 1.6;
}
.matrix-legend b { color: #374151; }
.matrix-hint {
  display: none; font-size: 13.5px; color: #9CA3AF; margin: 0 0 10px;
}

@media (max-width: 900px) {
  .matrix-hint { display: block; }
  .matrix tbody th { min-width: 190px; }
  .matrix { font-size: 15px; }
  .matrix th, .matrix td { padding: 11px 13px; }
}

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .glance-grid, .personas { grid-template-columns: 1fr; }
  .figure .bar .lbl { display: none; }
  /* Rein in the enlarged type so nothing overflows a phone */
  main.wrap { font-size: 16.5px; line-height: 1.62; }
  main.wrap h1 { font-size: 30px; margin: 34px 0 14px; }
  main.wrap .lede { font-size: 18px; }
  main.wrap h2 { font-size: 23px; margin: 42px 0 14px; }
  main.wrap h3 { font-size: 18.5px; }
  main.wrap .cta { font-size: 16px; padding: 14px 28px; }
  .matrix-wrap { max-height: 70vh; }
}
