/* /whatsapp (templates/whatsapp.html + pages/whatsapp.html). Loaded after site.css and product.css and built from their tokens.
   Layout: the two options side by side, then the one bold thing on the page, two example chats as phones on a chat wallpaper,
   then a quiet comparison table and the article. A ready option is drawn solid; a coming-soon option is drawn dashed. */
:root {
  --wa-wall: #e8e4dc; --wa-in: #ffffff; --wa-out: #dff3d8; --wa-out-ink: #12301c; --wa-chip: #f3f1ec;
  --wa-head: var(--surface-dark); --wa-head-ink: #ffffff; --wa-btn-ink: #1a6fa3; --wa-meta: #6b7380;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wa-wall: #0c1118; --wa-in: #1d2532; --wa-out: #17382a; --wa-out-ink: #dff3d8; --wa-chip: #18202b;
    --wa-head: #1d2532; --wa-head-ink: #e8ebf0; --wa-btn-ink: #7cc4f0; --wa-meta: #8d97a6;
  }
}
:root[data-theme="dark"] {
  --wa-wall: #0c1118; --wa-in: #1d2532; --wa-out: #17382a; --wa-out-ink: #dff3d8; --wa-chip: #18202b;
  --wa-head: #1d2532; --wa-head-ink: #e8ebf0; --wa-btn-ink: #7cc4f0; --wa-meta: #8d97a6;
}

.wa-intro { padding-bottom: 0; }
.wa-intro .prose > :last-child { margin-bottom: 0; }

/* the two options */
.wa-options h2 { max-width: 22ch; }
.wa-opts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: clamp(16px, 3vw, 28px); }
@media (min-width: 820px) { .wa-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wa-opt { min-width: 0; border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); display: flex; flex-direction: column; }
.wa-opt h3 { font-size: clamp(1.3rem, 1.1rem + .6vw, 1.55rem); margin-bottom: .4em; }
.wa-opt > :last-child { margin-bottom: 0; }
.wa-opt-now { background: var(--surface); border: 2px solid var(--accent); }
.wa-opt-soon { background: transparent; border: 2px dashed var(--line); }
.wa-state { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-weight: 600; font-size: .92rem; margin-bottom: .8em; }
.wa-state::before { content: ""; width: 9px; height: 9px; border-radius: 999px; flex: none; }
.wa-state-now { color: var(--ok); }
.wa-state-now::before { background: var(--ok); }
.wa-state-soon { color: var(--warn); }
.wa-state-soon::before { background: transparent; border: 2px solid var(--warn); box-sizing: border-box; }
.wa-from { color: var(--ink-2); }
.wa-from strong { color: var(--ink); }
.wa-facts { margin: 0 0 1em; padding-left: 1.2em; }
.wa-facts li { margin: 6px 0; }
.wa-soon-note { font-weight: 600; padding-top: 12px; border-top: 1px solid var(--line); }
.wa-switch { margin: 18px 0 0; color: var(--ink-2); max-width: 70ch; }

/* the example chats */
.wa-examples .section-head .lead { max-width: 62ch; }
.wa-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 5vw, 56px); }
@media (min-width: 900px) { .wa-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; } }
.wa-col { min-width: 0; max-width: 420px; width: 100%; margin-inline: auto; display: flex; flex-direction: column; }
.wa-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; }
.wa-pill-now { background: color-mix(in srgb, var(--ok) 16%, transparent); }
.wa-pill-soon { background: color-mix(in srgb, var(--warn) 16%, transparent); }

.wa-phone { margin: 0; background: var(--wa-wall); border: 1px solid var(--line); border-radius: 26px; overflow: hidden;
  box-shadow: 0 30px 60px -40px rgba(15, 27, 45, .5); }
.wa-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--wa-head); color: var(--wa-head-ink); }
.wa-avatar { width: 36px; height: 36px; flex: none; border-radius: 999px; display: grid; place-items: center; font-weight: 700;
  background: rgba(255, 255, 255, .16); color: var(--wa-head-ink); }
.wa-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.wa-who strong { font-size: 1rem; }
.wa-sub { font-size: .8rem; opacity: .75; }
.wa-thread { list-style: none; margin: 0; padding: 14px 12px 18px; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; line-height: 1.45; }
.wa-day { align-self: center; background: var(--wa-chip); color: var(--wa-meta); font-size: .76rem; font-weight: 600; padding: 3px 10px; border-radius: 8px; margin-top: 4px; }
.wa-note { align-self: center; text-align: center; max-width: 90%; color: var(--wa-meta); font-size: .78rem; font-style: italic; }
.wa-msg { position: relative; max-width: 88%; border-radius: 10px; padding: 8px 10px 6px; box-shadow: 0 1px 1px rgba(15, 27, 45, .08); }
.wa-msg p { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.wa-in { align-self: flex-start; background: var(--wa-in); border-top-left-radius: 3px; }
.wa-out { align-self: flex-end; background: var(--wa-out); border-top-right-radius: 3px; }
.wa-out p { color: var(--wa-out-ink); }
.wa-time { display: block; text-align: right; font-size: .7rem; color: var(--wa-meta); margin-top: 2px; font-variant-numeric: tabular-nums; }
/* the template's buttons, as WhatsApp draws them: ruled rows under the message, centred, in link blue */
.wa-btns { list-style: none; margin: 6px -10px -6px; padding: 0; border-top: 1px solid var(--line); }
.wa-btns li { padding: 9px 10px; text-align: center; color: var(--wa-btn-ink); font-weight: 600; font-size: .88rem; }
.wa-btns li + li { border-top: 1px solid var(--line); }
.wa-btns li.is-tapped { background: color-mix(in srgb, var(--wa-btn-ink) 10%, transparent); }
.wa-btn-link::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: 6px; vertical-align: -1px;
  border: 2px solid currentColor; border-radius: 2px; border-top-color: transparent; border-right-color: transparent; transform: rotate(225deg) scale(.8); }

.wa-firm { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 16px; }
.wa-firm-h { font-weight: 600; margin: 0 0 6px; font-size: .95rem; }
.wa-firm ul { margin: 0; padding-left: 1.1em; font-size: .92rem; color: var(--ink-2); }
.wa-firm li { margin: 3px 0; }
.wa-examples-note { margin: clamp(24px, 4vw, 36px) auto 0; max-width: 70ch; text-align: center; }

/* the comparison */
.wa-compare th { text-transform: none; letter-spacing: 0; font-size: .95rem; white-space: normal; color: var(--ink); }
.wa-compare th[scope="row"] { width: 9.5em; font-weight: 600; vertical-align: top; }
.wa-compare td { vertical-align: top; }
.wa-yes { color: var(--ok); font-weight: 600; }
.wa-soon { color: var(--warn); font-weight: 600; }
@media (max-width: 640px) {
  .wa-compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .wa-compare tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .wa-compare tr:last-child { border-bottom: 0; }
  .wa-compare th[scope="row"], .wa-compare td { display: block; width: auto; padding: 0; border: 0; }
  .wa-compare th[scope="row"] { margin-bottom: 6px; }
  .wa-compare td { padding: 2px 0 2px 0; }
  .wa-compare td::before { content: attr(data-label); display: block; font-size: .8rem; color: var(--ink-2); font-weight: 500; }
  .wa-compare td + td::before { margin-top: 6px; }
}

.wa-detail { padding-top: 0; }
.wa-detail .prose > h2:first-child { margin-top: 0; }
