/* Shared by the comparison pages (/splitwise-alternative, /compare).
   Colours come from palette.css; the home page keeps its own styles inline. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

header.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.mark { width: 32px; height: 32px; border-radius: 9px; display: block; }
header.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; margin-left: 20px; }
header.top nav a:hover { color: var(--ink); }

.crumbs { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.crumbs a { color: var(--muted); }

h1 {
  font-size: clamp(34px, 5.4vw, 52px); line-height: 1.06; letter-spacing: -.03em;
  margin: 20px 0 16px; font-weight: 750; text-wrap: balance;
}
.lede { font-size: 20px; color: var(--muted); margin: 0 0 24px; max-width: 34em; }
.checked { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
h2 { font-size: 28px; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 16px; text-wrap: balance; }
h3 { font-size: 19px; margin: 24px 0 6px; }
section { padding: 40px 0; border-top: 1px solid var(--rule); }
section.first { border-top: 0; padding-top: 8px; }
section p, section li { max-width: 40em; }
section p { margin: 0 0 14px; }
section ul { padding-left: 1.2em; margin: 0 0 14px; }
section li { margin: 6px 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 20px; border-radius: 12px;
  text-decoration: none; font-weight: 600; font-size: 16px;
}
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.ghost { background: var(--accent-soft); color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* The comparison table. Wide ones scroll sideways inside their own box, with
   the feature names pinned, so the page itself never scrolls sideways. */
.table { overflow-x: auto; margin: 8px -20px 0; padding: 0 20px; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; line-height: 1.45; }
table.wide { min-width: 820px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
thead th { font-size: 14px; color: var(--muted); font-weight: 600; white-space: nowrap; }
tbody th { font-weight: 600; width: 24%; }
table.wide tbody th, table.wide thead th:first-child { position: sticky; left: -20px; background: var(--bg); }
td.us, thead th.us { background: var(--card); }
thead th.us { color: var(--ink); border-radius: 12px 12px 0 0; }
tbody tr:last-child td.us { border-radius: 0 0 12px 12px; }
.yes { color: var(--credit); font-weight: 600; }
.no { color: var(--debit); font-weight: 600; }
td small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.clip { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 32px; align-items: center; }
.shot {
  width: 100%; margin: 0; padding: 7px; background: var(--ink); border-radius: 32px;
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--shadow) 45%, transparent);
}
.shot img { display: block; width: 100%; height: auto; border-radius: 26px; background: var(--bg); }
:root[data-theme="dark"] .shot { background: var(--rule); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shot { background: var(--rule); } }

details { border-bottom: 1px solid var(--rule); max-width: 40em; }
summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
details p { margin: 0 0 16px; color: var(--muted); }

.sources { font-size: 14.5px; color: var(--muted); }
.sources a { color: var(--muted); }

footer { border-top: 1px solid var(--rule); padding: 28px 0 48px; font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
footer nav a { color: var(--muted); margin-right: 20px; }

@media (max-width: 700px) {
  .clip { grid-template-columns: minmax(0, 1fr); }
  .clip .shot { max-width: 240px; justify-self: center; }
  th, td { padding: 10px 10px; }
  header.top nav a:not(:last-child) { display: none; }
}
