/*
  Willo, Direction B "Willow ledger": the info pages (group "info", branch eli-redesign-info).
  How, FAQ, Contact, Contact sent, Privacy, Cookies and Terms. Linked from those templates only,
  after willo.css, and every rule is scoped to their page-<urlname> class on <html>.
  Uses the --w- tokens from willo.css; defines none of its own.
*/

/* ---------- Shared reading frame ---------- */

:is(.page-how, .page-faq, .page-contact, .page-contact-success, .page-privacy, .page-cookies) .w-info {
  padding-top: var(--w-s2);
}

/* A reading column: about 70 characters a line at the base size. */
:is(.page-faq, .page-contact, .page-contact-success) .w-info--read {
  max-width: var(--w-measure);
}
:is(.page-faq, .page-contact, .page-contact-success) .w-info--read p {
  margin: 0 0 var(--w-s3);
}

/* Title over a firm rule, like the head of a ledger page. */
:is(.page-how, .page-faq, .page-contact, .page-contact-success) .w-info__head {
  margin-bottom: var(--w-s5);
  padding-bottom: var(--w-s3);
  border-bottom: var(--w-rule-strong);
}
:is(.page-how, .page-faq, .page-contact, .page-contact-success) .w-info__head h1 {
  margin: 0;
  font-size: var(--w-t-xl);
  letter-spacing: -0.01em;
}
:is(.page-faq, .page-contact) .w-info__head .w-info__lede {
  margin: var(--w-s2) 0 0;
  font-size: var(--w-t-md);
  line-height: 1.45;
  color: var(--w-ink-2);
}

/* ---------- How ---------- */

/* The explainer is three images of text. They sit in one left-aligned column as wide as the
   largest image's sizes attribute (1000px), so the srcset choice still matches. */
.page-how .w-info { max-width: 1000px; }
.page-how .w-info__figure { margin: 0 0 var(--w-s4); }
.page-how .w-info__figure picture { display: block; }
.page-how .w-info__img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--w-rule);
  border-radius: var(--w-radius);
}
.page-how .w-info__pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 var(--w-s4);
}
@media (min-width: 769px) {
  .page-how .w-info__pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- FAQ: one question after another, divided by ledger rules ---------- */

.page-faq .w-faq__item {
  padding: var(--w-s4) 0;
  border-bottom: var(--w-rule);
}
.page-faq .w-faq__item:first-child { padding-top: 0; }
.page-faq .w-faq__item h2 {
  margin: 0 0 var(--w-s1);
  font-size: var(--w-t-md);
  line-height: 1.3;
  color: var(--w-ink);
}
.page-faq .w-faq__item p { margin: 0; }

/* ---------- Privacy and Cookies ---------- */

/* The policy text is pasted from a generator and carries inline style attributes on almost
   every span (15px, greys, Arial, Roboto, a blue for links, black table borders). An inline
   style can only be outranked by !important, so each override below is !important and limited
   to the one property the generator set. The policy markup itself is left exactly as pasted. */
:is(.page-privacy, .page-cookies) .w-legal {
  max-width: var(--w-measure);
  font-size: var(--w-t-base);
  line-height: 1.6;
  color: var(--w-ink);
}
:is(.page-privacy, .page-cookies) .w-legal [style] {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
}

/* The generator's badge: left aligned with the text instead of centred above it. */
:is(.page-privacy, .page-cookies) .w-legal > span[style] {
  margin: 0 0 var(--w-s5) !important;
}

:is(.page-privacy, .page-cookies) .w-legal [data-custom-class="title"] {
  font-family: var(--w-font-head);
  font-size: var(--w-t-xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
:is(.page-privacy, .page-cookies) .w-legal [data-custom-class="subtitle"] {
  color: var(--w-ink-2);
  font-weight: 600;
}
:is(.page-privacy, .page-cookies) .w-legal [data-custom-class="heading_1"] {
  font-family: var(--w-font-head);
  font-size: var(--w-t-lg);
  font-weight: 600;
  line-height: 1.25;
}
:is(.page-privacy, .page-cookies) .w-legal [data-custom-class="heading_2"] {
  font-family: var(--w-font-head);
  font-size: var(--w-t-md);
  font-weight: 600;
  line-height: 1.3;
}
:is(.page-privacy, .page-cookies) .w-legal :is(a, a[style]) {
  color: var(--w-willow-2) !important;
  overflow-wrap: break-word;
}
:is(.page-privacy, .page-cookies) .w-legal a:hover { color: var(--w-willow) !important; }

:is(.page-privacy, .page-cookies) .w-legal :is(ul, ol) { padding-left: var(--w-s4); }
:is(.page-privacy, .page-cookies) .w-legal li { margin-bottom: 4px; }

/* Ledger tables: soft rules between rows, no boxes, words never split mid-word. */
:is(.page-privacy, .page-cookies) .w-legal table {
  width: 100%;
  margin: var(--w-s3) 0;
  border-collapse: collapse;
}
:is(.page-privacy, .page-cookies) .w-legal td {
  padding: var(--w-s2) var(--w-s2) var(--w-s2) 0;
  border: 0 !important;
  border-bottom: var(--w-rule) !important;
  vertical-align: top !important;
  overflow-wrap: break-word;
  word-break: normal !important;
  hyphens: manual;
}
:is(.page-privacy, .page-cookies) .w-legal td:last-child { padding-right: 0; }

/* Privacy: the generator split one table (Category, Examples, Collected) into three <table>s
   with an empty div between them. Join them back into one ledger: no gap between the pieces,
   and only the row with the bold column names is the head. */
.page-privacy .w-legal table { margin: 0; }
.page-privacy .w-legal tr:first-child:has(strong) td {
  border-bottom: var(--w-rule-strong) !important;
  font-size: var(--w-t-sm) !important;
  color: var(--w-ink-2) !important;
}
/* Each Collected cell starts with an empty spacer line (a div holding only <br>), which pushed
   "NO" a line below the row text once cells align to the top. */
.page-privacy .w-legal td > div:has(> br:only-child) { display: none; }
@media (max-width: 599.98px) {
  .page-privacy .w-legal table { font-size: var(--w-t-sm); }
}

/* Cookies: the cookie's details as label and value rows. */
.page-cookies .w-legal section[style] {
  margin: var(--w-s3) 0 var(--w-s4) !important;
  border: 0 !important;
  border-top: var(--w-rule-strong) !important;
  border-radius: 0 !important;
}
.page-cookies .w-legal section[style] > div[style] {
  padding: 0 !important;
  border: 0 !important;
}
.page-cookies .w-legal section table { margin: 0; }
.page-cookies .w-legal section td[style] {
  display: table-cell !important;
  margin: 0 !important;
  text-align: left !important;
}
.page-cookies .w-legal section td:first-child {
  width: 1%;
  min-width: 0 !important;
  white-space: nowrap;
  font-size: var(--w-t-sm);
  font-weight: 600;
  color: var(--w-ink-2) !important;
}
.page-cookies .w-legal section td span[style] {
  word-break: normal !important;
  overflow-wrap: break-word;
}
