/* ==========================================================================
   Certifreight Reports — Public Frontend
   Design system: ink/paper neutrals + a single blue accent, square corners,
   hairline rules, no gradients/shadows. Montserrat for display, Inter for body.
   ========================================================================== */

:root {
    --cf-ink: #14161c;
    --cf-surface: #ffffff;
    --cf-blue: #004AAC;
    --cf-blue-deep: #003580;
    --cf-lime: #AADF07;
    --cf-line: #e4e6ea;
    --cf-muted: #6b7280;

    /* Semantic "flagged" tone, deliberately outside the blue/lime brand pair
       so a compliance risk never reads as an accent. */
    --cf-amber: #9A5514;
    --cf-amber-bg: #FDF4EA;
    --cf-amber-line: #EBD6BC;

    --cf-font-display: 'Montserrat', sans-serif;
    --cf-font-body: 'Inter', sans-serif;

    --cf-radius: 6px;
    --cf-radius-lg: 10px;
    --cf-max-width: 1100px;
}

/* The active theme (Astra) wraps page content in a flex column
   (.ast-container { display: flex; flex-direction: column; }), which
   fights our own max-width/margin centering. Neutralize it, but only on
   the wrappers that actually contain our plugin's markup so the rest of
   the site (blog, other pages) keeps its normal theme layout untouched. */
.ast-container:has(.cf-product-page),
.ast-container:has(.cf-search-page) {
    display: block !important;
}

body.single-cf_product #content.site-content,
body.single-cf_product .site-content .ast-container {
    display: block !important;
}

.cf-search-page, .cf-product-page {
    font-family: var(--cf-font-body);
    color: var(--cf-ink);
    max-width: var(--cf-max-width);
    margin: 0 auto;
    padding: 56px 20px 96px;
}

.cf-search-page *, .cf-product-page * { box-sizing: border-box; }

.cf-search-page a:not(.cf-btn), .cf-product-page a:not(.cf-btn) { color: var(--cf-blue); }

/* -------------------- Search / Browse -------------------- */

.cf-search-header { margin-bottom: 32px; }

.cf-search-title {
    font-family: var(--cf-font-display);
    font-weight: 700;
    font-size: 30px;
    line-height: 1.2;
    margin: 0 0 8px 0;
}

.cf-search-subtitle {
    font-size: 15px;
    color: var(--cf-muted);
    margin: 0;
}

.cf-search-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px;
    margin-bottom: 32px;
    background: var(--cf-ink);
    border-radius: var(--cf-radius-lg);
    overflow: hidden;
}

.cf-search-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../images/search-banner-cargo-ship.jpg');
    background-size: cover;
    background-position: center;
}

.cf-search-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(20, 22, 28, 0.94) 0%, rgba(20, 22, 28, 0.82) 45%, rgba(20, 22, 28, 0.5) 100%);
}

.cf-search-banner-text,
.cf-search-banner-cta {
    position: relative;
    z-index: 1;
}

.cf-search-banner-heading {
    font-family: var(--cf-font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--cf-surface);
    margin: 0 0 4px 0;
}

.cf-search-banner-copy {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.cf-search-banner-cta { flex-shrink: 0; }

.cf-search-bar-wrap { margin-bottom: 20px; }

.cf-search-input {
    width: 100%;
    font-family: var(--cf-font-body);
    font-size: 16px;
    padding: 14px 16px;
    border: 1px solid var(--cf-ink);
    border-radius: var(--cf-radius);
    background: var(--cf-surface);
    color: var(--cf-ink);
    outline: none;
}

.cf-search-input:focus {
    border-color: var(--cf-blue);
    box-shadow: 0 0 0 1px var(--cf-blue);
}

.cf-search-input::placeholder { color: var(--cf-muted); }

.cf-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.cf-chip {
    font-family: var(--cf-font-body);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    background: transparent;
    color: var(--cf-ink);
    border: 1px solid var(--cf-line);
    border-radius: var(--cf-radius);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.cf-chip:hover { border-color: var(--cf-ink); }

.cf-chip-active,
.cf-chip-active:hover {
    background: var(--cf-ink);
    color: var(--cf-surface);
    border-color: var(--cf-ink);
}

.cf-chip:focus-visible,
.cf-search-input:focus-visible,
.cf-btn:focus-visible {
    outline: 2px solid var(--cf-blue);
    outline-offset: 2px;
}

.cf-results-list { display: flex; flex-direction: column; gap: 10px; }

.cf-results-list.cf-results-fade-in {
    animation: cf-fade-up 0.35s ease both;
}

.cf-results-loading {
    width: 110px;
    max-width: 30vw;
    aspect-ratio: 4 / 3;
    margin: 32px auto;
}

.cf-results-empty-lottie {
    width: 180px;
    max-width: 45vw;
    aspect-ratio: 1 / 1;
    margin: 12px auto 0;
}

.cf-results-empty {
    color: var(--cf-muted);
    text-align: center;
    padding: 8px 0 12px;
    font-size: 14px;
}

.cf-results-empty-cta { text-align: center; padding-bottom: 24px; }

.cf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
}

.cf-pagination-label {
    font-size: 13px;
    color: var(--cf-muted);
    font-variant-numeric: tabular-nums;
}

.cf-result-row {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: var(--cf-surface);
    border: 1px solid var(--cf-line);
    border-radius: var(--cf-radius-lg);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cf-result-row:hover {
    border-color: var(--cf-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(20, 22, 28, 0.07);
}

/* Category doodle watermark - quiet, tiled, brand-blue line art per category.
   Each pattern file lives in assets/images/patterns/{category-slug}.svg. */
.cf-result-row::before {
    content: "";
    position: absolute;
    inset: 0;
    background-repeat: repeat;
    background-size: 150px;
    opacity: 0.015;
    pointer-events: none;
}

.cf-result-row[data-category-slug="chemicals"]::before {
    background-image: url('../images/patterns/chemicals.svg');
}
.cf-result-row[data-category-slug="construction-materials"]::before {
    background-image: url('../images/patterns/construction-materials.svg');
}
.cf-result-row[data-category-slug="cosmetics-personal-care"]::before {
    background-image: url('../images/patterns/cosmetics-personal-care.svg');
}
.cf-result-row[data-category-slug="food-beverages"]::before {
    background-image: url('../images/patterns/food-beverages.svg');
}
.cf-result-row[data-category-slug="paper-hygiene"]::before {
    background-image: url('../images/patterns/paper-hygiene.svg');
}
.cf-result-row[data-category-slug="ppe-safety"]::before {
    background-image: url('../images/patterns/ppe-safety.svg');
}

.cf-result-main { position: relative; min-width: 0; }

.cf-result-title {
    font-family: var(--cf-font-display);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.35;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: normal;
    word-break: normal;
}

.cf-result-excerpt {
    font-size: 13px;
    line-height: 1.45;
    color: var(--cf-muted);
    margin: 4px 0 0;
    min-height: 2.9em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cf-result-aside {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    max-width: 46%;
}

.cf-result-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cf-muted);
    flex-shrink: 0;
}

.cf-result-code {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: var(--cf-muted);
    line-height: 1.4;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cf-result-readmore {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cf-blue);
    white-space: nowrap;
    flex-shrink: 0;
}

.cf-result-arrow {
    display: inline-block;
    width: 16px;
    height: 16px;
    position: relative;
    transition: transform 0.15s ease;
}

.cf-result-arrow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 1px;
    background: var(--cf-ink);
    transform: translateY(-50%);
}

.cf-result-arrow::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 7px;
    height: 7px;
    border-top: 1px solid var(--cf-ink);
    border-right: 1px solid var(--cf-ink);
    transform: translateY(-50%) rotate(45deg);
}

.cf-result-row:hover .cf-result-arrow { transform: translateX(3px); }

/* -------------------- Product / Report Preview -------------------- */

.cf-product-breadcrumb {
    font-size: 13px;
    color: var(--cf-muted);
    margin-bottom: 20px;
}

.cf-product-breadcrumb a { text-decoration: none; }
.cf-product-breadcrumb a:hover { text-decoration: underline; }
.cf-breadcrumb-sep { margin: 0 6px; }

.cf-product-header { margin-bottom: 28px; }

.cf-product-title {
    font-family: var(--cf-font-display);
    font-weight: 700;
    font-size: 28px;
    line-height: 1.25;
    margin: 0 0 12px 0;
}

.cf-product-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.cf-badge {
    font-family: var(--cf-font-body);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 5px 10px;
    border: 1px solid var(--cf-ink);
    border-radius: var(--cf-radius);
}

.cf-product-markets {
    font-size: 13px;
    color: var(--cf-muted);
}

/* ---- Report cover band ---- */

.cf-report-cover {
    position: relative;
    overflow: hidden;
    background: var(--cf-blue);
    color: #ffffff;
    border-radius: var(--cf-radius-lg);
    padding: 34px 36px;
    margin-bottom: 26px;
}

/* Category line-art watermark. The source SVGs are brand-blue stroke, which
   would vanish on a blue field - inverting to white keeps one asset set doing
   both jobs (search cards and this cover). */
.cf-report-cover-doodled::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--cf-cover-doodle);
    background-repeat: repeat;
    background-size: 130px;
    filter: brightness(0) invert(1);
    opacity: 0.07;
    pointer-events: none;
}

.cf-report-cover > * { position: relative; z-index: 1; }

.cf-cover-kicker {
    font-family: var(--cf-font-display);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 10px;
}

.cf-cover-title {
    font-family: var(--cf-font-display);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.5px;
    margin: 0 0 16px;
    color: #ffffff;
    max-width: 24ch;
    text-wrap: balance;
}

.cf-cover-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.cf-cover-chip {
    font-size: 11.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    padding: 5px 11px;
    border-radius: 99px;
    font-variant-numeric: tabular-nums;
}

.cf-cover-chip-accent {
    background: var(--cf-lime);
    border-color: var(--cf-lime);
    color: var(--cf-ink);
}

/* ---- "Where shipments fail" ranked panel ---- */

.cf-risk-panel { margin-bottom: 34px; }

.cf-risk-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.cf-risk-panel-head h2 {
    font-family: var(--cf-font-display);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--cf-ink);
    margin: 0;
}

.cf-risk-panel-head span { font-size: 12px; color: var(--cf-muted); }

.cf-risk-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.cf-risk-item {
    background: var(--cf-amber-bg);
    border: 1px solid var(--cf-amber-line);
    border-radius: 9px;
    padding: 15px 17px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cf-risk-rank { display: flex; align-items: center; gap: 8px; }

.cf-risk-num {
    font-style: normal;
    font-family: var(--cf-font-display);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.7px;
    background: var(--cf-amber);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 99px;
    font-variant-numeric: tabular-nums;
}

.cf-risk-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--cf-amber);
}

.cf-risk-title {
    font-family: var(--cf-font-display);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--cf-ink);
    margin: 0;
    /* Extracted headlines vary in length; clamp so every card lines up. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cf-risk-detail {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--cf-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Report body + sticky CTA column. The text column keeps a readable measure
   (~760px) instead of stretching to the full container, and the unlock card
   occupies the space that measure leaves over. */
.cf-report-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) minmax(280px, 1fr);
    gap: 40px;
    align-items: start;
}

.cf-report-aside { position: sticky; top: 24px; }

.cf-report-preview-wrap { position: relative; }

.cf-report-preview {
    overflow: hidden;
    font-size: 15px;
    line-height: 1.75;
    /* JS sets max-height to ~50% of natural content height; this mask
       fades the text itself over the last third, well before the cutoff. */
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 65%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 65%, transparent 100%);
}

.cf-report-preview h3 {
    font-family: var(--cf-font-display);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-left: 3px solid var(--cf-blue);
    padding-left: 10px;
    margin: 24px 0 10px 0;
}

.cf-report-preview p { margin: 0 0 14px 0; }

.cf-report-preview table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 18px 0;
    font-size: 14px;
}

.cf-report-preview th,
.cf-report-preview td {
    text-align: left;
    padding: 9px 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.cf-report-preview thead th {
    font-family: var(--cf-font-display);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #fff;
    background: var(--cf-ink);
    border-bottom: none;
}

.cf-report-preview tbody tr:nth-child(even) { background: #f6f7f9; }

.cf-report-preview-full {
    -webkit-mask-image: none;
    mask-image: none;
    max-height: none !important;
}

.cf-admin-preview-ribbon {
    background: var(--cf-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 10px 16px;
    border-radius: var(--cf-radius);
    margin-bottom: 20px;
}

.cf-blur-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 128px;
    background: linear-gradient(to bottom, transparent 0%, var(--cf-surface) 70%);
    pointer-events: none;
}

/* ---- Unlock card ---- */

.cf-unlock {
    background: var(--cf-ink);
    color: #ffffff;
    border-radius: var(--cf-radius-lg);
    padding: 26px 26px;
}

.cf-unlock-title {
    font-family: var(--cf-font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    margin: 0 0 8px;
    text-wrap: balance;
}

.cf-unlock-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.74);
    margin: 0 0 20px;
    max-width: 54ch;
}

/* One column: in the aside there isn't room for two, and stacked ticks read
   as a checklist of what you're buying. */
.cf-unlock-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.cf-unlock-list li {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
}

.cf-unlock-tick {
    flex: 0 0 15px;
    height: 15px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--cf-lime);
    color: var(--cf-ink);
    display: grid;
    place-items: center;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
}

.cf-unlock-foot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 18px;
}

.cf-unlock-from {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.66);
}

.cf-unlock-from b {
    display: block;
    font-family: var(--cf-font-display);
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.cf-unlock-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Scoped under .cf-unlock on purpose: the generic `.cf-btn { border: 1px solid
   transparent }` rule is declared later in this file, and at equal specificity
   its shorthand would reset any border-color set here - which is exactly how
   the outline button ended up looking borderless. */
.cf-unlock .cf-btn {
    text-align: center;
    padding: 12px 20px;
}

.cf-unlock .cf-unlock-btn-primary {
    background: #ffffff;
    color: var(--cf-ink);
    border: 1px solid #ffffff;
}

.cf-unlock .cf-unlock-btn-primary:hover {
    background: var(--cf-lime);
    border-color: var(--cf-lime);
    color: var(--cf-ink);
}

.cf-unlock .cf-unlock-btn-outline {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.cf-unlock .cf-unlock-btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
    color: #ffffff;
}

/* -------------------- Buttons -------------------- */

.cf-btn {
    font-family: var(--cf-font-body);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--cf-radius);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.cf-btn-primary {
    background: var(--cf-blue);
    color: var(--cf-surface);
    border-color: var(--cf-blue);
}

.cf-btn-primary:hover { background: var(--cf-blue-deep); border-color: var(--cf-blue-deep); }

.cf-btn-outline {
    background: transparent;
    color: var(--cf-ink);
    border-color: var(--cf-ink);
}

.cf-btn-outline:hover { background: var(--cf-ink); color: var(--cf-surface); }

.cf-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* -------------------- Accordion Wizard -------------------- */

/* Full site container width - the wizard is no longer capped at 640px, so the
   tier step's two-column feature lists get room to breathe. */
.cf-accordion-section {
    margin: 0 auto;
    padding-top: 8px;
}

/* -------------------- Pricing tier step (wizard step 1) -------------------- */

.cf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cf-step-intro {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--cf-muted);
    margin: -8px 0 24px;
}

.cf-tier-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cf-tier-row {
    position: relative;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid var(--cf-line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cf-tier-row:hover { border-color: #b9c4d4; }

.cf-tier-row.cf-tier-selected {
    border-color: var(--cf-blue);
    background: #f5f9ff;
    box-shadow: 0 0 0 3px rgba(0, 74, 172, 0.1);
}

/* The real radio stays in the DOM for keyboard/AT users; the visible control
   is the label beside it, so arrow-key navigation still works. */
.cf-tier-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.cf-tier-radio {
    flex: 0 0 18px;
    height: 18px;
    margin-top: 2px;
    border: 2px solid #c3cad6;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.cf-tier-row.cf-tier-selected .cf-tier-radio { border-color: var(--cf-blue); }

.cf-tier-row.cf-tier-selected .cf-tier-radio::after {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cf-blue);
}

.cf-tier-input:focus-visible + .cf-tier-radio {
    outline: 2px solid var(--cf-blue);
    outline-offset: 3px;
}

.cf-tier-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cf-tier-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.cf-tier-name {
    font-family: var(--cf-font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--cf-ink);
}

.cf-tier-badge {
    font-style: normal;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    background: var(--cf-lime);
    color: var(--cf-ink);
    padding: 3px 8px;
    border-radius: 99px;
    margin-left: 8px;
    white-space: nowrap;
}

.cf-tier-price {
    font-family: var(--cf-font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--cf-blue);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cf-tier-promise {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--cf-muted);
    margin: 0;
}

.cf-tier-toggle {
    align-self: flex-start;
    background: none;
    border: 0;
    padding: 2px 0;
    margin-top: 2px;
    font-family: var(--cf-font-body);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cf-blue);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cf-tier-toggle .cf-tier-toggle-label {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cf-tier-detail {
    list-style: none;
    margin: 8px 0 0;
    padding: 14px 0 0;
    border-top: 1px dashed var(--cf-line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 18px;
}

.cf-tier-detail li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--cf-ink);
}

.cf-tier-detail li.cf-tier-feature-off { color: #a2a8b4; }

.cf-tier-tick {
    flex: 0 0 15px;
    height: 15px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--cf-blue);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
}

.cf-tier-tick-no {
    background: #e3e7ee;
    color: #8a91a0;
}

.cf-tier-footnote {
    font-size: 12px;
    line-height: 1.55;
    color: #8a91a0;
    text-align: center;
    margin: 18px 0 0;
}

/* Selected tier, pinned above the answers on the review step */
.cf-review-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #f5f9ff;
    border: 1px solid #cfe0f7;
    border-left: 3px solid var(--cf-blue);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.cf-review-tier-key {
    display: block;
    font-family: var(--cf-font-display);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--cf-muted);
    margin-bottom: 2px;
}

.cf-review-tier-value {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--cf-ink);
}

.cf-review-tier-value b {
    color: var(--cf-blue);
    font-variant-numeric: tabular-nums;
}

.cf-review-tier-change {
    background: none;
    border: 0;
    padding: 0;
    font-family: var(--cf-font-body);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cf-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    white-space: nowrap;
}

/* Selected tier, echoed on the confirmation screen */
.cf-confirmation-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    background: var(--cf-blue);
    color: #ffffff;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 22px auto 0;
    max-width: 380px;
    text-align: left;
}

.cf-confirmation-tier-key {
    display: block;
    font-family: var(--cf-font-display);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.cf-confirmation-tier-name {
    display: block;
    font-family: var(--cf-font-display);
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.cf-confirmation-tier-price {
    font-family: var(--cf-font-display);
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .cf-tier-detail { grid-template-columns: 1fr; }
    .cf-tier-row { padding: 14px 14px; }
    .cf-tier-price { font-size: 18px; }
    .cf-tier-badge { margin-left: 0; margin-top: 4px; display: inline-block; }
}

.cf-progress-indicator { margin-bottom: 32px; }

.cf-progress-label {
    display: block;
    font-family: var(--cf-font-display);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cf-muted);
    margin-bottom: 10px;
}

.cf-progress-segments {
    display: flex;
    gap: 5px;
}

.cf-progress-segment {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: var(--cf-line);
    transition: background 0.25s ease;
}

.cf-progress-segment.cf-segment-filled { background: var(--cf-lime); }

.cf-step {
    display: none;
}

.cf-step.cf-step-active {
    position: relative;
    display: block;
    background: var(--cf-surface);
    border: 1px solid var(--cf-line);
    border-radius: 10px;
    padding: 36px;
    box-shadow: 0 2px 10px rgba(20, 22, 28, 0.05);
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cf-step.cf-step-active.cf-step-animate-in {
    opacity: 0;
    transform: translateX(14px);
    transition: none;
}

.cf-step-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 10px;
    animation: cf-fade-up 0.2s ease both;
    z-index: 5;
}

.cf-step-loading-lottie { width: 90px; aspect-ratio: 4 / 3; }

.cf-step-loading-text {
    font-size: 13px;
    color: var(--cf-muted);
    margin: 0;
}

.cf-step-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cf-blue);
    margin-bottom: 10px;
}

.cf-step-heading {
    font-family: var(--cf-font-display);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.35;
    margin: 0 0 24px 0;
}

.cf-step-fields { display: block; }

.cf-field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--cf-muted);
    margin: 18px 0 6px 0;
}

.cf-step-fields .cf-field-label:first-child { margin-top: 0; }

/* Form fields span the full width of the wizard card / container. */
.cf-step-fields { max-width: none; }

.cf-field-input,
.cf-field-textarea,
.cf-field-select {
    width: 100%;
    font-family: var(--cf-font-body);
    font-size: 15px;
    padding: 11px 14px;
    border: 1px solid var(--cf-line);
    border-radius: var(--cf-radius);
    background: var(--cf-surface);
    color: var(--cf-ink);
}

.cf-field-input:focus,
.cf-field-textarea:focus,
.cf-field-select:focus {
    outline: none;
    border-color: var(--cf-blue);
    box-shadow: 0 0 0 1px var(--cf-blue);
}

.cf-field-textarea { resize: vertical; min-height: 90px; }

.cf-field-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.cf-field-input.cf-input-invalid,
.cf-field-textarea.cf-input-invalid,
.cf-country-select.cf-input-invalid {
    border-color: #b3261e;
}

.cf-field-error {
    display: none;
    color: #b3261e;
    font-size: 12px;
    margin-top: 6px;
}

.cf-field-error.cf-visible { display: block; }

/* -------------------- Phone field: country select + dropdown -------------------- */

.cf-phone-field {
    position: relative;
    display: flex;
    gap: 8px;
}

.cf-country-select {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 12px;
    border: 1px solid var(--cf-line);
    border-radius: var(--cf-radius);
    background: var(--cf-surface);
    cursor: pointer;
    font-family: var(--cf-font-body);
    font-size: 15px;
    color: var(--cf-ink);
}

.cf-country-select:hover { border-color: var(--cf-ink); }

.cf-country-flag { font-size: 16px; line-height: 1; }

.cf-country-caret { font-size: 10px; color: var(--cf-muted); }

.cf-phone-input { flex: 1; min-width: 0; }

.cf-country-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 280px;
    max-width: 90vw;
    background: var(--cf-surface);
    border: 1px solid var(--cf-line);
    border-radius: var(--cf-radius);
    box-shadow: 0 8px 24px rgba(20, 22, 28, 0.12);
    z-index: 20;
    padding: 8px;
}

.cf-country-search {
    width: 100%;
    font-family: var(--cf-font-body);
    font-size: 14px;
    padding: 9px 12px;
    border: 1px solid var(--cf-line);
    border-radius: var(--cf-radius);
    margin-bottom: 6px;
}

.cf-country-search:focus {
    outline: none;
    border-color: var(--cf-blue);
}

.cf-country-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}

.cf-country-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
}

.cf-country-list li:hover,
.cf-country-list li.cf-country-highlighted {
    background: var(--cf-line);
}

.cf-country-list .cf-country-list-dial {
    color: var(--cf-muted);
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.cf-country-list-empty {
    padding: 12px 10px;
    color: var(--cf-muted);
    font-size: 13px;
}

.cf-review-summary { font-size: 14px; }

.cf-review-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cf-line);
}

.cf-review-item dt { color: var(--cf-muted); }
.cf-review-item dd { margin: 0; text-align: right; font-weight: 500; }

.cf-step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

.cf-form-error {
    color: #b3261e;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.cf-form-error.cf-visible { display: block; }

.cf-accordion.cf-fade-out {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cf-confirmation {
    text-align: center;
    padding: 24px 20px 48px;
}

.cf-confirmation-lottie {
    width: 200px;
    max-width: 55vw;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

.cf-confirmation.cf-fade-in {
    animation: cf-fade-up 0.4s ease both;
}

.cf-confirmation h2 {
    font-family: var(--cf-font-display);
    font-size: 22px;
    margin: 0 0 10px 0;
}

.cf-confirmation p { color: var(--cf-muted); margin: 0; }

/* -------------------- Motion -------------------- */

@keyframes cf-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cf-search-header,
.cf-product-header,
.cf-report-preview-wrap {
    animation: cf-fade-up 0.5s ease both;
}

.cf-product-header { animation-delay: 0.05s; }
.cf-report-preview-wrap { animation-delay: 0.1s; }

.cf-btn { transform: translateY(0); }
.cf-btn-primary:hover,
.cf-btn-outline:hover { transform: translateY(-1px); }

.cf-chip:hover:not(.cf-chip-active) { transform: translateY(-1px); }

/* -------------------- Reduced motion -------------------- */

@media (prefers-reduced-motion: reduce) {
    .cf-result-arrow,
    .cf-progress-fill,
    .cf-btn,
    .cf-chip,
    .cf-step.cf-step-active,
    .cf-result-row,
    .cf-accordion.cf-fade-out {
        transition: none;
    }

    .cf-search-header,
    .cf-product-header,
    .cf-report-preview-wrap,
    .cf-confirmation.cf-fade-in,
    .cf-results-list.cf-results-fade-in,
    .cf-step-loading-overlay {
        animation: none;
    }
}

/* -------------------- Responsive -------------------- */

/* Tablet: the risk cards go two-up before they go single-column, and the
   unlock feature list stops trying to hold two columns. */
/* Below this the two columns would both be too narrow to be worth it - the
   card drops under the report text and spans the full measure instead. */
@media (max-width: 1000px) {
    .cf-report-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
    .cf-report-preview-wrap { max-width: 760px; }
    .cf-report-aside {
        position: static;
        max-width: 760px;
        margin-top: -14px;
    }
    .cf-unlock-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 9px 22px;
    }
    .cf-unlock-foot {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 18px;
    }
    .cf-unlock-buttons { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 900px) {
    .cf-cover-title { font-size: 27px; max-width: none; }
    .cf-report-cover { padding: 28px 24px; }
    .cf-unlock-list { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 640px) {
    .cf-report-cover { padding: 24px 20px; border-radius: var(--cf-radius); }
    .cf-cover-title { font-size: 23px; }
    .cf-cover-kicker { font-size: 10px; }
    .cf-cover-chip { font-size: 11px; padding: 4px 9px; }
    .cf-report-cover-doodled::after { background-size: 100px; }

    .cf-risk-list { grid-template-columns: 1fr; }
    .cf-risk-panel-head { gap: 4px; }
    .cf-risk-panel-head span { font-size: 11.5px; }
    /* On one column there's no card-height alignment to preserve, so let the
       full headline and explanation through rather than clamping. */
    .cf-risk-title,
    .cf-risk-detail {
        display: block;
        -webkit-line-clamp: none;
        overflow: visible;
    }

    .cf-unlock {
        padding: 22px 20px;
        border-radius: var(--cf-radius);
    }
    .cf-report-aside { margin-top: -8px; }
    .cf-unlock-title { font-size: 18px; }
    .cf-unlock-sub { font-size: 13.5px; margin-bottom: 16px; }
    .cf-unlock-foot {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .cf-unlock-from b { font-size: 20px; }

    /* The catalog's test-parameter tables are 3 columns of real prose - they
       can't reflow, so let them scroll inside themselves instead of forcing
       the page body sideways. */
    .cf-report-preview table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
    .cf-report-preview th,
    .cf-report-preview td {
        white-space: normal;
        min-width: 150px;
    }

    .cf-search-page, .cf-product-page { padding: 32px 16px 64px; }
    .cf-search-title { font-size: 24px; }
    .cf-result-category { display: none; }
    .cf-result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .cf-result-aside {
        width: 100%;
        max-width: none;
        flex-wrap: wrap;
        row-gap: 6px;
    }
    .cf-result-code {
        white-space: normal;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: normal;
        word-break: normal;
        flex: 1 1 auto;
        min-width: 0;
    }
    .cf-result-readmore {
        margin-left: auto;
    }
    .cf-step.cf-step-active { padding: 24px 20px; }
    .cf-step-heading { font-size: 18px; }
    .cf-unlock-buttons { flex-direction: column; width: 100%; }
    .cf-unlock-buttons .cf-btn { width: 100%; text-align: center; }
    .cf-search-banner { flex-direction: column; align-items: flex-start; }
    .cf-search-banner-cta { width: 100%; text-align: center; }
    .cf-review-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .cf-review-item dd { text-align: left; }
    .cf-product-title { font-size: 22px; }
    .cf-pagination { flex-wrap: wrap; gap: 12px; }
    .cf-results-loading { width: 84px; margin: 24px auto; }
    .cf-results-empty-lottie { width: 140px; }
    .cf-confirmation-lottie { width: 150px; }
    .cf-step-loading-lottie { width: 70px; }
    .cf-step-loading-text { font-size: 12px; padding: 0 20px; text-align: center; }
}
