/* The pricing page: the full comparison table with one tab for each buyer, billing, the questions.
   The table takes the .plans rules of styles.css (the homepage table). This file adds the groups and the sticky head. */

#plans .tabs { margin-top: var(--s-7); }
/* the h1 breaks at its sentence */
.hero--page .hero__c { max-width: 1040px; }
.hero--page h1 { max-width: none; }
.h1-line { display: block; }
#plans [role="tabpanel"] { margin-top: var(--s-6); }
#plans [role="tabpanel"][hidden] { display: none; }

/* one row of words before the broker table */
.plans-lead { max-width: 62ch; margin-bottom: var(--s-5); }

/* the name of a group of rows */
.plans .plans__group th { width: auto; padding-top: var(--s-6); font-weight: 500; font-size: var(--t-lead); border-bottom-color: var(--line-strong); }
.plans > tbody:first-of-type .plans__group th { padding-top: var(--s-5); }

/* the head of the table stays in view under the nav while the visitor reads the rows, at each width */
@media (min-width: 640px) {
  .plans--full thead th { position: sticky; top: var(--nav); z-index: 1; background: var(--bg);
    border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line-strong); }
}
/* under 640px the rows are grids (display: block on the table), so the whole head sticks.
   The small lines of the heads hide here to keep the head short: the summary and the questions hold those facts. */
@media (max-width: 639px) {
  .plans--full > thead { position: sticky; top: var(--nav); z-index: 1; background: var(--bg); }
  .plans--full thead small { display: none; }
}

/* the agents table on a phone, as the three tiers in styles.css: the name of a row on its own line, the two values under it.
   The small lines of the column heads hide here: the short answer above the table holds those facts. */
@media (max-width: 639px) {
  .plans--agents, .plans--agents > :is(thead, tbody) { display: block; }
  .plans--agents tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
  .plans--agents tr > * { padding: 0; border: 0; }
  .plans--agents thead tr { padding-top: 0; padding-bottom: var(--s-4); border-bottom-color: var(--line-strong); }
  .plans--agents thead th:first-child { display: none; }
  .plans--agents tbody th { grid-column: 1 / -1; width: auto; padding-bottom: var(--s-2); }
  .plans--agents tbody th small { display: block; }
  .plans--agents .plans__group { padding-top: var(--s-6); border-bottom-color: var(--line-strong); }
  .plans--agents .plans__group th { padding: 0; }
}

/* the three-tier table and "a month" under the price: see styles.css (the homepage uses them too) */

/* how billing works: four ruled rows */
.terms > div { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-2) var(--gutter); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.terms > div:first-child { border-top: 1px solid var(--line-strong); }
.terms dt { grid-column: span 4; font: 500 var(--t-lead)/1.4 var(--font-text); }
.terms dd { grid-column: span 8; max-width: 62ch; margin: 0; }
@media (max-width: 639px) {
  .terms dt, .terms dd { grid-column: 1 / -1; }
}

/* the answers in two columns under their heading; a line stays under 75 characters */
.faq--two > .faq__item > p { max-width: 34em; }
@media (min-width: 1024px) {
  .faq--two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-7); }
  .faq--two > .faq__item { align-content: start; }
  .faq--two > .faq__item:nth-child(2) { padding-top: 0; }
}

/* the short answer above the table: one line for each buyer */
.plans-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4) var(--gutter); margin-top: var(--s-7); padding-top: var(--s-4); border-top: 1px solid var(--line-strong); }
.plans-sum dt { font-weight: 500; }
.plans-sum dd { margin: 0; }
.plans-sum + .tabs { margin-top: var(--s-6); }
@media (max-width: 899px) { .plans-sum { grid-template-columns: minmax(0, 1fr); } }
/* a link inside an answer: a 44px touch area as a layer, as styles.css gives .link */
@media (pointer: coarse) {
  .faq p a { position: relative; }
  .faq p a::before { content: ""; position: absolute; inset: -11px 0; }
}

/* What the paid plan adds (Joey, 2026-11-15): the Solo Agent cell of such a row sits on the surface colour and its
   name is medium, so the eye finds the added rows in a long table. No second colour: blue stays on the action. */
.plans-adds { max-width: 56ch; margin-bottom: var(--s-5); font-size: var(--t-lead); line-height: 1.5; }
.plans-adds strong { font-weight: 500; }
.plans--agents tr.is-added > th { font-weight: 500; }
.plans--agents tr.is-added > td:last-child { background: var(--surface); font-weight: 500; }
.plans--agents tr.is-added > td:last-child, .plans--agents thead th:last-child { padding-left: var(--s-4); }
.plans--agents tbody tr:not(.is-added):not(.plans__group) > td:last-child { padding-left: var(--s-4); }

/* An added row says so in words, and the line under the count tells a visitor which plan fits. */
.plans__paid { display: inline-block; margin-left: var(--s-1); padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; vertical-align: 1px; }
.plans-which { max-width: 56ch; margin-bottom: var(--s-5); color: var(--muted); }
