/* Pricing page only (site/pages/pricing.html). Linked after site.css and pages.css. Task M-Pricing, board Pricing (+ Phone, Tablet).
   The plan cards and the FAQ are shared sections (pages.css); this file lays the page out as the board does (sections with
   their own padding, no gap), and styles the "on every plan" band, the plan matrix and the competitor comparison.
   Tokens only. The highlighter appears as a `.mark` fill (DESIGN-1c): the bullets, the "ours" wash and the ring on our card. */

/* — page: the sections own their padding, as the board's do: each is as wide as the column with its side padding (the
   board's section box) and puts its content back on the column — */
.page--pricing { gap: 0; padding-block: 0; }
.page--pricing > * { margin-inline: calc(-1 * clamp(16px, 4vw, 40px)); padding-inline: clamp(16px, 4vw, 40px); }
.page--pricing > .faq { box-sizing: border-box; width: min(calc(100% + 2 * clamp(16px, 4vw, 40px)), 940px); align-self: center; max-width: none; margin-inline: 0; }
.page--pricing .section-title { font-size: clamp(32px, 4vw, 56px); line-height: 1; }
.page--pricing .faq { padding-bottom: clamp(64px, 8vw, 112px); }
.page--pricing .faq .section-title { font-size: clamp(32px, 4vw, 48px); }

/* — head: the h1 is a short sentence, so it wraps at a comfortable measure; the Monthly/Yearly toggle (the next section's
   first row) sits 28px under the lede — */
.page--pricing .page-head { gap: 28px; max-width: none; padding-block: clamp(48px, 7vw, 96px) 28px; }
.page--pricing .page-head h1 { max-width: 7.786em; text-wrap: balance; } /* the board's 14ch in its face (0.5561em a figure), as em so a face still loading cannot move it */
.page--pricing .page-head__lede { max-width: 620px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--color-text-muted); }

/* — plans: 40px under the toggle, the footnote, then room before the band — */
.page--pricing .tiers { padding-bottom: clamp(48px, 6vw, 80px); }
.page--pricing .tiers__head { margin-bottom: 20px; }
/* The board draws no heading over the cards. The section keeps one for the outline and for screen readers (the plan names are h3). */
.page--pricing .tiers__head .section-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.page--pricing .tiers__toggle .seg-opt { line-height: normal; }
.page--pricing .tiers__free { font-weight: var(--weight-semibold); line-height: normal; }

/* — on every plan, including Free: a full-width band, the intro beside a ruled grid of tiles — */
.protected { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 40px; align-items: start; padding-block: clamp(56px, 7vw, 96px); }
.protected__intro { display: flex; flex-direction: column; gap: 16px; }
.protected .section-title { text-wrap: balance; }
.protected__intro .lede { max-width: 440px; font-size: 17px; line-height: 1.5; }
.protected__intro .lede a { color: var(--color-on-band); text-decoration: underline; text-underline-offset: 3px; }
.protected__body { display: flex; flex-direction: column; gap: 12px; }
.protected__list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 2px;
  margin: 0; padding: 0; list-style: none; overflow: hidden;
  border: 1px solid var(--color-band-line); border-radius: 16px;
}
.protected__list li {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px;
  font-size: 14.5px; line-height: 1.4;
  background: color-mix(in oklab, var(--color-band) 94%, white 6%);
}
.protected__bullet { display: block; color: var(--color-on-band); flex: none; width: 8px; height: 8px; margin: 7px 0 0; padding: 0; border-radius: 2px; }
.protected__more { display: none; }
.protected__more summary {
  display: flex; justify-content: center; align-items: center; gap: 8px; box-sizing: content-box; min-height: 44px; line-height: normal; list-style: none; cursor: pointer;
  border: 1px solid var(--color-band-line); border-radius: 999px;
  background: color-mix(in oklab, var(--color-band) 94%, white 6%); color: var(--color-on-band); font-weight: var(--weight-semibold); font-size: 15px;
}
.protected__more summary::-webkit-details-marker { display: none; }
.protected__more .chev, .mx-more .chev { flex: none; width: 18px; height: 18px; stroke-width: 2.2; transition: transform var(--dur-ui) var(--ease-out); }
.protected__more[open] .chev, .mx-more[open] .chev { transform: rotate(180deg); }
.protected__more[open] .protected__show, .protected__more:not([open]) .protected__hide { display: none; }

/* — the plan matrix: a bordered card holding one table — */
.mx-sec { padding-block: clamp(56px, 7vw, 96px); gap: 28px; }
.mx-more { display: none; }
.mx-wrap { overflow-x: auto; border: 1px solid var(--color-line); border-radius: 16px; background: var(--color-surface); }
.pricing-table { width: 100%; border-collapse: collapse; border-spacing: 0; font-size: 14.5px; }
.pricing-table th, .pricing-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-line); font-size: 14.5px; line-height: 1.45; white-space: normal; }
/* the shared .seo-table draws a line above every body row; the board's matrix has only the lines below */
.pricing-table tbody th, .pricing-table tbody td { border-top: 0; }
.pricing-table thead th { font-weight: var(--weight-semibold); color: var(--color-text); background: transparent; }
.pricing-table thead th:first-child { width: 34%; min-width: 10rem; }
.pricing-table tbody tr:last-child th, .pricing-table tbody tr:last-child td { border-bottom: 1px solid var(--color-line); }
.pricing-table tbody th { font-weight: var(--weight-medium); }
.pricing-table th[scope="row"], .pricing-table thead th:first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--color-surface); box-shadow: 1px 0 0 var(--color-line); }
.pricing-table td { font-family: var(--font-mono); font-size: 13px; color: var(--color-text-muted); }
.pricing-table td.tabular { white-space: nowrap; }
.pricing-table .mx-group { display: none; }
@media (hover: hover) { .pricing-table tbody tr:hover td { background: color-mix(in oklab, var(--color-text) 3%, transparent); } }
@media (min-width: 721px) and (max-width: 1023px) {
  .pricing-table th, .pricing-table td { padding: 12px 10px; }
  .pricing-table thead th:first-child { width: 30%; }
}

/* — the competitor comparison: a table wide, cards below 1180px, a sideways snap row on a phone — */
.compare { padding-block: 0 clamp(56px, 7vw, 96px); gap: 20px; }
.compare__head { display: flex; flex-direction: column; gap: 12px; }
.compare__head .section-title { text-wrap: balance; }
.compare__lede { max-width: 720px; margin: 0; font-size: 16px; line-height: 1.5; color: var(--color-text-muted); }
.compare__sources { max-width: 760px; margin: 0; font-size: 13px; line-height: 1.5; color: var(--color-text-muted); }
.compare__sources a { text-decoration: underline; text-underline-offset: 3px; }
.vs-wrap { overflow-x: auto; border: 1px solid var(--color-line); border-radius: 16px; background: var(--color-surface); }
.vs-table { width: 100%; min-width: 1100px; border-collapse: collapse; font-size: 14.5px; }
.vs-table th, .vs-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-line); line-height: 1.45; }
.vs-table th { font-weight: var(--weight-semibold); }
.vs-table thead th:first-child { width: 18%; }
.vs-table tbody th { font-weight: var(--weight-medium); }
.vs-table td { font-size: 13.5px; }
.vs-table th[scope="row"], .vs-table thead th:first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--color-surface); box-shadow: 1px 0 0 var(--color-line); }
@media (hover: hover) { .vs-table tbody tr:hover td:not(.vs-ours) { background: color-mix(in oklab, var(--color-text) 3%, transparent); } }
.vs-muted { color: var(--color-text-muted); }
.vs-good, .vs-ours { color: var(--color-text); }
/* Our column and card: a highlighter wash behind ink text, so the element is a `.mark` (a fill) with its own tint. */
th.mark.vs-ours { margin: 0; padding: 14px 16px; border-radius: 0; background: color-mix(in oklab, var(--color-highlight) 22%, var(--color-surface)); color: var(--color-text); }
td.mark.vs-ours, .vs-card--ours.mark { margin: 0; border-radius: 0; background: color-mix(in oklab, var(--color-highlight) 12%, var(--color-surface)); color: var(--color-text); }
td.mark.vs-ours { padding: 14px 16px; }
.vs-cards { display: none; }
.vs-card { position: relative; display: flex; flex-direction: column; padding: 6px 16px 8px; border: 1px solid var(--color-line); border-radius: 16px; background: var(--color-surface); }
.vs-card--ours.mark { border-radius: 16px; border-width: 2px; border-color: transparent; padding: 6px 16px 8px; }
.vs-card__edge {
  position: absolute; inset: -2px; margin: 0; padding: 2px; border-radius: inherit; pointer-events: none;
  -webkit-mask: linear-gradient(black 0 0) content-box, linear-gradient(black 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(black 0 0) content-box exclude, linear-gradient(black 0 0);
}
.vs-card h3 { margin: 0; padding: 12px 0 8px; font-family: var(--font-display); font-weight: var(--weight-heavy); font-size: 20px; line-height: 1.1; letter-spacing: -0.02em; }
.vs-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-line); font-size: 13.5px; line-height: 1.4; }
.vs-row__label { color: var(--color-text-muted); }
.vs-scroll { display: contents; }
.vs-pos { display: none; margin: 0; line-height: normal; font-family: var(--font-mono); font-size: 12px; color: var(--color-text-muted); text-align: center; }
@media (max-width: 1179px) {
  .vs-wrap { display: none; }
  .vs-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* — a phone (720px and below) — */
@media (max-width: 720px) {
  .protected__more { display: block; }
  .protected__list li:nth-child(n + 6) { display: none; }
  .protected:has(.protected__more[open]) .protected__list li:nth-child(n + 6) { display: flex; }

  .mx-more { display: block; }
  .mx-more summary {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; line-height: normal; list-style: none; cursor: pointer;
    border: 1px solid var(--color-line); border-radius: 16px; background: var(--color-surface);
  }
  .mx-more summary::-webkit-details-marker { display: none; }
  .mx-more__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .mx-more__title { font-weight: var(--weight-semibold); font-size: 15px; }
  .mx-more__groups { font-family: var(--font-mono); font-size: 12px; line-height: 1.5; color: var(--color-text-muted); }
  .mx-more[open] .mx-more__show, .mx-more:not([open]) .mx-more__hide { display: none; }
  .mx-sec .mx-wrap { display: none; }
  .mx-sec:has(.mx-more[open]) .mx-wrap { display: block; }

  /* Each row is a card: the first column its title, every other column one "Label: value" line (A14). `.mx-sec` outranks the shared .seo-table phone rules (stacked cards with the SEO table's own labels). */
  .mx-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .mx-sec .pricing-table, .mx-sec .pricing-table tbody { display: block; }
  .mx-sec .pricing-table thead { display: none; }
  .mx-sec .pricing-table tbody { display: flex; flex-direction: column; gap: 10px; }
  .mx-sec .pricing-table tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; padding: 12px 16px;
    border: 1px solid var(--color-line); border-radius: 14px; background: var(--color-surface);
  }
  .mx-sec .pricing-table tbody tr:hover td { background: transparent; }
  .mx-sec .pricing-table th[scope="row"] { display: block; grid-column: 1 / -1; position: static; padding: 0 0 6px; border: 0; background: transparent; box-shadow: none; font-size: 15px; font-weight: var(--weight-semibold); }
  .mx-sec .pricing-table td { display: flex; flex-wrap: nowrap; justify-content: flex-start; align-items: baseline; gap: 6px; padding: 4px 0; border: 0; font-size: 13px; text-align: left; }
  .mx-sec .pricing-table tbody td::before { content: attr(data-label) ":"; flex: none; font-family: var(--font-body); font-size: 13.5px; font-weight: var(--weight-regular); color: var(--color-text-muted); }
  .mx-sec .pricing-table tbody td:last-child { padding-block-end: 4px; }
  .mx-sec .pricing-table td.tabular { white-space: normal; }
  .mx-sec .pricing-table tbody tr:last-child th, .mx-sec .pricing-table tbody tr:last-child td { border-bottom: 0; }
  .mx-sec .pricing-table tr.mx-group { display: block; padding: 10px 0 0; border: 0; background: transparent; }
  .mx-sec .pricing-table tr.mx-group td { display: block; padding: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-muted); }
  .mx-sec .pricing-table tr.mx-group td::before { content: none; }
  /* Rows keep their desktop place in the HTML; the phone order is the groups' order (td[data-o], a group row sits 5 before its first row). */
  .pricing-table tr:has(> td[data-o="1"]) { order: 10; } .pricing-table tr.mx-group[data-o="1"] { order: 5; }
  .pricing-table tr:has(> td[data-o="2"]) { order: 20; } .pricing-table tr.mx-group[data-o="2"] { order: 15; }
  .pricing-table tr:has(> td[data-o="3"]) { order: 30; } .pricing-table tr.mx-group[data-o="3"] { order: 25; }
  .pricing-table tr:has(> td[data-o="4"]) { order: 40; } .pricing-table tr.mx-group[data-o="4"] { order: 35; }
  .pricing-table tr:has(> td[data-o="5"]) { order: 50; } .pricing-table tr.mx-group[data-o="5"] { order: 45; }
  .pricing-table tr:has(> td[data-o="6"]) { order: 60; } .pricing-table tr.mx-group[data-o="6"] { order: 55; }
  .pricing-table tr:has(> td[data-o="7"]) { order: 70; } .pricing-table tr.mx-group[data-o="7"] { order: 65; }
  .pricing-table tr:has(> td[data-o="8"]) { order: 80; } .pricing-table tr.mx-group[data-o="8"] { order: 75; }
  .pricing-table tr:has(> td[data-o="9"]) { order: 90; } .pricing-table tr.mx-group[data-o="9"] { order: 85; }
  .pricing-table tr:has(> td[data-o="10"]) { order: 100; } .pricing-table tr.mx-group[data-o="10"] { order: 95; }
  .pricing-table tr:has(> td[data-o="11"]) { order: 110; } .pricing-table tr.mx-group[data-o="11"] { order: 105; }
  .pricing-table tr:has(> td[data-o="12"]) { order: 120; } .pricing-table tr.mx-group[data-o="12"] { order: 115; }
  .pricing-table tr:has(> td[data-o="13"]) { order: 130; } .pricing-table tr.mx-group[data-o="13"] { order: 125; }
  .pricing-table tr:has(> td[data-o="14"]) { order: 140; } .pricing-table tr.mx-group[data-o="14"] { order: 135; }
  .pricing-table tr:has(> td[data-o="15"]) { order: 150; } .pricing-table tr.mx-group[data-o="15"] { order: 145; }
  .pricing-table tr:has(> td[data-o="16"]) { order: 160; } .pricing-table tr.mx-group[data-o="16"] { order: 155; }

  .vs-cards { display: flex; flex-direction: column; gap: 12px; }
  .vs-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .vs-scroll::-webkit-scrollbar { display: none; }
  .vs-scroll > .vs-card { flex: 0 0 min(300px, 82%); box-sizing: border-box; scroll-snap-align: start; }
  .vs-pos { display: block; }
}
