/* bestinmatetextingapps.com — design system
   Type: Public Sans (US federal gov typeface) for UI/body, Newsreader for headings.
   Boldness spent in one place: the #1 verdict + its single red CTA. */

:root {
  --paper: #f4f5f3;
  --surface: #ffffff;
  --ink: #16223a;
  --blue: #1c4e89;
  --blue-dark: #143a66;
  --red: #be3a31;
  --red-dark: #9f2d25;
  --green: #2e7d5b;
  --muted: #5c6676;
  --line: #e4e3de;
  --rank-gold: #b7892f;

  --maxw: 1040px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 34, 58, .06), 0 8px 24px rgba(22, 34, 58, .06);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; max-width: 68ch; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 3px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--tight { padding-block: clamp(1.75rem, 4vw, 2.75rem); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 245, 243, .92);
  backdrop-filter: saturate(1.3) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.18rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; gap: .45rem; }
.brand b { color: var(--blue); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:hover { color: var(--blue); }
@media (max-width: 760px) { .nav .nav-link { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-weight: 700; font-size: 1rem; line-height: 1;
  padding: .85rem 1.3rem; border-radius: var(--radius); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color .15s ease, transform .05s ease; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 1px 0 var(--red-dark); }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--sm { padding: .6rem .95rem; font-size: .92rem; }
.btn--block { width: 100%; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 4rem); }
.hero .kicker { font-family: var(--sans); font-weight: 700; color: var(--blue); font-size: .95rem; margin: 0 0 .75rem; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-bottom: 1.5rem; }
.updated { color: var(--muted); font-size: .9rem; margin: 1.25rem 0 0; }

.trust-strip { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.trust-strip li { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); padding: .35rem .7rem; border-radius: 999px; }
.check { color: var(--green); font-weight: 700; }

/* ---------- top pick verdict ---------- */
.pick { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.25rem, 3vw, 1.9rem); margin-top: 2rem; }
.pick__tag { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .85rem; color: var(--red-dark); margin-bottom: .6rem; }
.pick__grid { display: grid; grid-template-columns: 1fr auto; gap: 1.25rem 2rem; align-items: start; }
.pick h2 { margin-bottom: .35rem; }
.pick__score { text-align: center; min-width: 120px; }
.pick__score .num { font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--blue); font-weight: 600; }
.pick__score .den { color: var(--muted); font-size: .95rem; }
.pick__score .label { display: block; font-size: .72rem; color: var(--muted); margin-top: .4rem; }
.pick__cta { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.pick__fine { color: var(--muted); font-size: .85rem; margin: .75rem 0 0; }
@media (max-width: 620px) {
  .pick__grid { grid-template-columns: 1fr; }
  .pick__score { text-align: left; display: flex; align-items: baseline; gap: .5rem; }
  .pick__score .label { margin: 0 0 0 .25rem; }
}

/* ---------- comparison table ---------- */
.rank-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .97rem; }
.rank-table caption { text-align: left; color: var(--muted); font-size: .85rem; padding: 0 0 .75rem; caption-side: bottom; }
.rank-table th, .rank-table td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.rank-table thead th { background: var(--ink); color: #fff; font-weight: 600; font-size: .85rem; }
.rank-table tbody tr:last-child td { border-bottom: 0; }
.rank-table tbody tr.is-top { background: #fbf6f5; }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: #fff; font-weight: 700; font-size: .9rem; }
.rank-table tr.is-top .rank-badge { background: var(--red); }
.app-name { font-weight: 700; }
.app-name small { display: block; font-weight: 500; color: var(--muted); font-size: .82rem; }
.score-pill { font-weight: 700; color: var(--blue); }
.yes { color: var(--green); font-weight: 700; } .no { color: var(--muted); }

@media (max-width: 760px) {
  .rank-table, .rank-table thead, .rank-table tbody, .rank-table th, .rank-table td, .rank-table tr { display: block; }
  .rank-table { border: 0; background: transparent; }
  .rank-table thead { position: absolute; left: -9999px; }
  .rank-table tbody tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; padding: .35rem .25rem .6rem; }
  .rank-table tbody tr.is-top { border-color: var(--red); }
  .rank-table td { border-bottom: 1px dashed var(--line); padding: .6rem 1rem; display: grid; grid-template-columns: 42% 1fr; gap: 1rem; }
  .rank-table td:last-child { border-bottom: 0; }
  .rank-table td::before { content: attr(data-label); font-weight: 700; color: var(--muted); font-size: .85rem; }
}

/* ---------- verdict cards ---------- */
.verdicts { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); margin-top: 1.5rem; }
@media (max-width: 680px) { .verdicts { grid-template-columns: 1fr; } }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.vcard__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.vcard h3 { margin: 0; }
.vcard .score-pill { font-family: var(--serif); font-size: 1.3rem; }
.vcard .pros, .vcard .cons { margin: .5rem 0 0; padding-left: 1.2rem; }
.vcard .pros li { color: var(--ink); } .vcard .cons li { color: var(--muted); }
.vcard .more { display: inline-block; margin-top: .9rem; font-weight: 600; }

/* ---------- criteria ---------- */
.criteria { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); margin-top: 1.25rem; }
@media (max-width: 680px) { .criteria { grid-template-columns: 1fr; } }
.criteria div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.criteria h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 700; margin-bottom: .3rem; }
.criteria p { font-size: .96rem; color: var(--muted); margin: 0; }

/* ---------- how-to teaser ---------- */
.howto { background: var(--ink); color: #eef1f6; border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); }
.howto h2 { color: #fff; }
.howto p { color: #cfd6e2; }
.howto ol { margin: 1rem 0 1.25rem; padding-left: 1.3rem; color: #eef1f6; }
.howto ol li { margin-bottom: .4rem; }
.howto a.btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.howto a.btn--ghost:hover { border-color: #fff; }

/* ---------- FAQ (CSS-only) ---------- */
.faq { margin-top: 1rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem .25rem; font-weight: 700; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-weight: 400; font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 .25rem 1.1rem; margin: 0; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--blue); color: #fff; border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 3rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe6f5; margin-inline: auto; }
.cta-band .btn--primary { margin-top: .75rem; box-shadow: 0 1px 0 var(--red-dark); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #c3cad6; margin-top: 2rem; }
.site-footer .wrap { padding-block: 2.5rem; }
.site-footer a { color: #e7ebf2; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 680px) { .foot-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.foot-grid h4 { font-family: var(--sans); color: #fff; font-size: .9rem; font-weight: 700; margin: 0 0 .7rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; } .foot-grid li { margin-bottom: .45rem; }
.disclosure { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.5rem; font-size: .85rem; color: #97a0b0; }
.disclosure p { max-width: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.byline { color: var(--muted); font-size: .9rem; margin: 0 0 1.4rem; }
.byline strong { color: var(--ink); font-weight: 700; }

.answer-box { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.answer-box h2 { margin-bottom: .5rem; }
.answer-box p { margin: 0; max-width: 72ch; }
