/* ==========================================================================
   Pricing Feature Comparison Matrix — used by pricing.php
   Styled with the same vocabulary as pricing-styles.css
   ========================================================================== */

.matrix-section {
    max-width: 1200px;
    margin: 25px auto 40px auto;
    padding: 0 20px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Full-bleed tinted band, so the matrix can alternate against a white section
   above it — .matrix-section itself is max-width 1200px and can't do this alone. */
.matrix-band {
    background: var(--yw-grey);
    padding: 60px 0 65px;
}

.matrix-band .matrix-section {
    margin-top: 0;
    margin-bottom: 0;
}

.matrix-intro { text-align: center; margin-bottom: 25px; }
.matrix-intro h2 { font-size: 2rem; font-weight: 700; color: #333; letter-spacing: -0.5px; margin: 0; }
.matrix-intro p { color: #6B7280; font-size: 1rem; margin: 6px 0 0 0; }

.matrix-wrap { overflow-x: auto; border: 2px solid #e0e0e0; border-radius: 3px; }

/* Card treatment — heading and table sit inside one card, matching the pricing
   cards above them. Opt-in via $matrix_card. Width is set to the span of the
   3-column pricing grid (1200px max-width less its 50px side padding) so the
   card's edges line up with the columns above it. */
.matrix-section.matrix-card {
    max-width: 1100px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 3px;
    padding: 35px 30px 30px 30px;
}

/* The table already sits in a bordered well — inside the card that reads as a
   double rule, so drop it back to a single top/bottom hairline. */
.matrix-section.matrix-card .matrix-wrap {
    border: none;
    border-radius: 0;
}

@media (max-width: 600px) {
    .matrix-section.matrix-card { padding: 25px 15px 20px 15px; }
}

table.matrix {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    /* NO min-width above the phone breakpoint. The table is fluid, so it can never
       be wider than whatever the page gives it — the fourth column (Operations,
       2026-09-05) has to come out of the shared width, not out of a horizontal
       scrollbar. The old 1080px pin was wider than the 1036px the /pricing card
       actually offers, so the matrix scrolled sideways even on a 1730px desktop.
       The only place a pixel minimum is allowed is the <=700px block at the foot
       of this file, where scrolling is the deliberate phone behaviour. */
    /* Fixed layout so the edition columns are sized by the rule below and not by
       their contents — otherwise a column of bare checkmarks (Pro) collapses
       narrower than its neighbours. Widths come from the thead row only. */
    table-layout: fixed;
}

/* Sticky plan header — mini versions of the pricing-card header bars */
.matrix thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #ffffff;
    border-bottom: 2px solid #0478CC;
    padding: 10px 8px;
    text-align: center;
    vertical-align: bottom;
}
/* Every edition column the same width; the feature column takes the rest.
   4 x 15% + 40% = 100%. Was 4 x 14% + 44%, and 3 x 15% + 55% before Operations
   was added (2026-09-05). The feature column gives up four points so the four
   edition columns fit inside the narrowest container the matrix is used in —
   the /pricing card, 1036px — which works out at ~155px per edition (wide enough
   for "Unlimited" and for the "Operations" header bar on one line) and ~414px of
   feature column, still enough for the description text that sells the row. */
.matrix thead th:not(.feature-col) { width: 15%; }
.matrix thead th.feature-col {
    width: 40%;
    text-align: left;
    padding-left: 18px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.matrix .th-bar {
    display: block;
    background: #0478CC;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 8px 6px;
    border-radius: 3px 3px 0 0;
    line-height: 1.2;
}
.matrix .th-bar.personal { background: #4AA6E8; }
/* Operations uses the brand blue, like Pro and Ultimate. It was #8D7EFB briefly —
   the per-audience accent yw_solutions() gives the nav row — but purple is not a
   content colour anywhere on this site (owner, 2026-09-05). Only Personal differs,
   and it always has. */
.matrix .th-price { font-size: 0.75rem; color: #4B5563; font-weight: 500; margin-top: 6px; }
.matrix .th-price b { color: #0478CC; font-size: 1rem; font-weight: 600; }
.matrix .th-cta {
    display: inline-block;
    margin-top: 7px;
    background: #0478CC;
    color: #fff;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 7px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.matrix .th-cta:hover { transform: translateY(-2px); }

/* Category band rows */
.matrix .cat td {
    background: #D9EBF7;
    color: #0B5BA8;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 10px 18px;
    border-top: 1px solid #c3ddf0;
    border-bottom: 1px solid #c3ddf0;
}
.matrix .cat .cat-count {
    font-weight: 500;
    font-size: 0.7rem;
    color: #0478CC;
    margin-left: 8px;
    text-transform: none;
    letter-spacing: 0;
}
.matrix .cat .cat-count::before { content: "("; }
.matrix .cat .cat-count::after  { content: ")"; }

/* Feature rows */
.matrix tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    font-size: 0.85rem;
    color: #333;
    background: #ffffff;
    vertical-align: middle;
}
.matrix tbody tr:nth-child(even):not(.cat) td { background: #fafbfc; }
.matrix tbody tr:not(.cat):hover td { background: #f0f7fc; }
.matrix td.feature {
    text-align: left;
    padding-left: 18px;
    padding-right: 16px;
    font-weight: 600;
    color: #333;
    width: 40%;   /* matches th.feature-col; under table-layout:fixed only the thead value is used */
}
.matrix td.feature .desc {
    display: block;
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #6B7280;
    margin-top: 2px;
    max-width: 46ch;
}
.matrix .learn {
    font-size: 0.72rem;
    font-weight: 600;
    color: #0478CC;
    text-decoration: none;
    white-space: nowrap;
}
.matrix .learn:hover { text-decoration: underline; }

/* Per-feature deep link, sits under the row's description */
.matrix .row-learn {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.68rem;
    opacity: 0.85;
}
.matrix tr:hover .row-learn { opacity: 1; }

/* Cell marks — same green check as the pricing cards */
.matrix .mcheck { color: #13CE8B; font-weight: 600; font-size: 1.2rem; }
.matrix .dash { color: #ccc; font-weight: 600; }
.matrix .val { font-weight: 600; color: #0478CC; font-size: 0.8rem; }
.matrix .badge-new {
    background: #13CE8B;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: 2px;
}
.matrix .badge-soon {
    background: #FA884C;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: 2px;
    letter-spacing: 0.3px;
}
.matrix sup.fn { color: #6B7280; font-size: 0.68em; }
.matrix .confirm { color: #FA884C; font-size: 0.75em; cursor: help; }

/* Footnotes */
.matrix-section .footnotes {
    margin: 14px 4px 0 4px;
    font-size: 0.7rem;
    color: #999;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* ==========================================================================
   Keeping four edition columns inside the width — the tiers below tighten the
   cells as the container narrows, so the table stays whole (no horizontal
   scrollbar) all the way down to the phone breakpoint.
   ========================================================================== */

/* Laptops and the narrower half of desktop. */
@media (max-width: 1100px) {
    .matrix tbody td { padding: 9px 8px; font-size: 0.8rem; }
    .matrix thead th { padding: 10px 5px; }
    .matrix .th-bar { font-size: 0.8rem; padding: 7px 4px; }
    .matrix .cat td { padding: 9px 14px; }
}

/* Tablets. "Unlimited" is the widest cell value on the table and sets this. */
@media (max-width: 860px) {
    .matrix tbody td { padding: 8px 5px; font-size: 0.78rem; }
    .matrix .val { font-size: 0.72rem; }
    .matrix .mcheck { font-size: 1.05rem; }
    .matrix .th-bar { font-size: 0.72rem; padding: 6px 3px; letter-spacing: 0; }
    .matrix td.feature { padding-left: 12px; padding-right: 10px; }
    .matrix thead th.feature-col,
    .matrix .cat td { padding-left: 12px; padding-right: 10px; }
}

/* Small tablets / large phones in landscape. The "OPERATIONS" header bar is the
   widest single unbreakable string on the table and is what sets this tier —
   below ~780px it stops fitting its own bar at 0.72rem. */
@media (max-width: 780px) {
    .matrix .th-bar { font-size: 0.66rem; }
    .matrix .val { font-size: 0.7rem; }
}

/* Phones: below this the table genuinely cannot hold five columns, so it becomes
   the standard pinned-first-column scroller instead. The min-width on the TABLE
   (not on individual cells — under table-layout:fixed a cell min-width is not
   reliably honoured) is the only pixel minimum in the file, and it is what makes
   it scroll — deliberately. 560px = 224px of feature column (40%) and 84px per
   edition (15%), which holds "Unlimited" and the OPERATIONS bar at any phone width. */
@media (max-width: 700px) {
    table.matrix { min-width: 560px; }
    .matrix .th-bar { font-size: 0.58rem; padding: 6px 2px; }
    .matrix td.feature,
    .matrix thead th.feature-col,
    .matrix .cat td.feature {
        position: sticky;
        left: 0;
        z-index: 3;
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
    }
    .matrix .cat td.feature { background: #D9EBF7; }
    .matrix thead th.feature-col { z-index: 6; background: #ffffff; }
}
