/* ============================================================================
   Oculato — readability & hierarchy refinements
   Catalog, product detail, comparison matrix.
   Loaded last. Tokens only, no new framework. Targeted overrides: this file
   raises the type floor, restores breathing room, and keeps dense data legible
   in light/dark without changing the product's visual language.
   ============================================================================ */

/* --------------------------------------------------------------------------
   1. Shared type floor
   Meaningful text never drops below 12px; uppercase micro-labels sit at 11px
   with a little tracking (Apple's footnote/caption relationship).
   -------------------------------------------------------------------------- */

.product-card__best,
.type-badge,
.account-chip,
.product-card__specs dt,
.stat__label,
.filter-label,
.fees-card__note,
.cmp-corner,
.cmp-group th,
.spec-card__title,
.audience-card__label,
.picker__name small,
.picker__fee small,
.picker__score small,
.compare-selected__meta small {
    font-size: 0.8125rem; /* 11px */
    letter-spacing: 0.07em;
    line-height: 1.3;
}

.product-card__period,
.product-card__first-year,
.product-card__score small,
.page-hero__stamp,
.insurance-item summary strong,
.cmp-head__meta,
.cmp-mobile__plan,
.cmp-group__state,
.compare-picker__status,
.compare-picker__summary-text small,
.compare-empty__steps li,
.compare-selected__name small,
.picker__fee,
.picker__score,
.selection-chip {
    font-size: 0.875rem; /* 12px */
}

/* --------------------------------------------------------------------------
   2. Catalog: card grid rhythm and a readable hierarchy
   Price > product name > type > actions. Labels stop competing with values.
   -------------------------------------------------------------------------- */

@media (min-width: 761px) {
    .product-grid--catalog,
    .product-grid--related {
        gap: 20px;
    }

    .product-card {
        padding: 22px;
    }
}

.product-card__best {
    margin-bottom: 12px;
    padding: 5px 10px;
    letter-spacing: 0.06em;
}

.type-badge {
    min-height: 24px;
    padding: 4px 9px;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.05em;
}

.account-chip {
    gap: 5px;
    letter-spacing: 0.04em;
}

.account-chip .icon {
    width: 12px;
    height: 12px;
}

.product-card__identity {
    gap: 7px 10px;
    margin-top: 14px;
}

.product-card__identity h3 {
    font-size: 19px;
    letter-spacing: -0.022em;
    line-height: 1.18;
}

.product-card__tagline {
    min-height: 42px;
    margin-top: 7px;
    font-size: 15px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
}

.product-card__price {
    gap: 4px 8px;
    min-height: 58px;
    margin-top: 16px;
    padding-top: 14px;
}

.product-card__amount {
    font-size: 28px;
    letter-spacing: -0.032em;
}

.product-card__period {
    letter-spacing: 0.02em;
}

.product-card__first-year {
    color: color-mix(in srgb, var(--green) 60%, var(--label));
    font-weight: var(--weight-medium);
}

/* Status icons carry meaning: raise green/orange to text-level contrast. */
.verification.is-verified .icon,
.verification--verified .icon,
.pros-cons__title--yes .icon,
.bool--yes .icon {
    color: color-mix(in srgb, var(--green) 60%, var(--label));
}

.verification.is-warning .icon,
.verification--needs_review .icon {
    color: color-mix(in srgb, var(--orange) 65%, var(--label));
}

.product-card__specs {
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
}

.product-card__specs dt {
    letter-spacing: 0.01em;
}

.product-card__specs dd {
    display: block;
    min-height: 2.6em;
    margin-top: 4px;
    overflow: visible;
    font-size: 14.5px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.product-card__foot {
    gap: 10px;
    padding-top: 14px;
}

.product-card__score-label {
    font-size: 14.5px;
}

.product-card__score {
    font-size: 17px;
}

.product-card__score small {
    font-size: 12.5px;
    letter-spacing: 0.02em;
}

.product-card__actions {
    gap: 8px;
    margin-top: 12px;
}

.product-card__actions .btn {
    min-height: 44px;
    padding-inline: 12px;
    font-size: 14.5px;
}

/* Catalog filter bar: labels are navigational text, not decoration. */
.filter-label {
    color: var(--label-secondary);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.08em;
}

.filter-panel--catalog .select-wrap select,
.filter-panel--catalog .select-wrap--input input {
    font-size: 16px;
}

.page-hero__stamp {
    padding: 8px 13px;
}

/* --------------------------------------------------------------------------
   3. Product detail: scannable stats, fees, limits, protections, sources
   -------------------------------------------------------------------------- */

.stat {
    justify-content: flex-start;
    min-height: 146px;
    padding: 20px;
}

.stat__label {
    letter-spacing: 0.08em;
}

.stat__value {
    margin-top: 12px;
    font-size: clamp(1.3rem, 1.9vw, 1.55rem);
    letter-spacing: -0.025em;
    line-height: 1.15;
    overflow-wrap: break-word;
    text-wrap: balance;
}

/* The free-band headline ("0% fino a 1.000 €/mese") is a phrase, not a
   number: it gets one size step down so it never crowds the card edge. */
.stat__value--band {
    font-size: clamp(1.1rem, 1.5vw, 1.28rem);
    letter-spacing: -0.018em;
    line-height: 1.3;
}

.stat__sub {
    font-size: 14px;
    line-height: 1.45;
}

@media (max-width: 760px) {
    .stat {
        min-height: 0;
    }
}

.prose-lead {
    line-height: 1.62;
}

.pros-cons__title {
    font-size: 13.5px;
    letter-spacing: 0.08em;
}

.pros-cons li {
    font-size: 16px;
    line-height: 1.55;
}

.fees-card__note {
    letter-spacing: 0.05em;
}

.fee-row {
    gap: 32px;
    padding: 16px 0;
}

.fee-row dt {
    font-size: 16px;
    line-height: 1.4;
}

.fee-row dt small {
    max-width: 60ch;
    margin-top: 4px;
    color: var(--label-secondary);
    font-size: 14.5px;
    font-weight: var(--weight-regular);
    line-height: 1.5;
}

.fee-row dd {
    max-width: 56%;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    line-height: 1.45;
    text-align: right;
    overflow-wrap: break-word;
}

@media (max-width: 760px) {
    .fee-row {
        gap: 4px;
    }

    .fee-row dd {
        max-width: none;
        text-align: left;
    }
}

.limit-list h3 {
    font-size: 14px;
    letter-spacing: 0.06em;
}

.limit-row {
    padding: 11px 0;
}

.limit-row span,
.limit-row strong {
    font-size: 14.5px;
    line-height: 1.45;
}

.limit-notes {
    font-size: 14.5px;
    line-height: 1.55;
}

.insurance-item summary {
    min-height: 52px;
    padding: 14px 16px;
    font-size: 16px;
}

.insurance-item summary strong {
    letter-spacing: 0.05em;
}

/* A quiet affordance so collapsed coverage reads as expandable. */
.insurance-item summary::after {
    content: "+";
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--fill-3);
    color: var(--label-secondary);
    font-size: 16px;
    font-weight: var(--weight-medium);
    line-height: 1;
}

.insurance-item[open] summary::after {
    content: "−";
}

.insurance-item[open] summary {
    border-bottom: 1px solid var(--separator);
}

.insurance-item__body {
    padding: 2px 16px 14px;
}

.insurance-item__body p {
    font-size: 15px;
    line-height: 1.55;
}

.lounge-detail {
    padding: 16px;
}

.lounge-detail__head strong,
.reward-item__head strong,
.promotion-card__head strong {
    font-size: 16px;
}

.lounge-detail p,
.reward-item > p,
.promotion-card > p {
    font-size: 15px;
    line-height: 1.55;
}

.reward-item__note {
    font-size: 14px !important;
    line-height: 1.5;
}

.promotion-card__meta span {
    padding: 5px 8px;
    font-size: 13.5px;
}

.source-list {
    gap: 12px;
}

.source-row {
    grid-template-columns: 30px minmax(0, 1fr) 16px;
    gap: 12px;
    padding: 14px;
    transition: background-color var(--duration-fast) var(--ease-out);
}

.source-row:hover {
    background: var(--fill-3);
}

.source-row__icon {
    width: 28px;
    height: 28px;
}

.source-row__icon .icon {
    width: 13px;
    height: 13px;
}

.source-row__body strong {
    display: block;
    overflow: visible;
    font-size: 15.5px;
    line-height: 1.35;
    text-overflow: clip;
    white-space: normal;
}

.source-row__body small {
    font-size: 14px;
    line-height: 1.45;
}

.source-row__body em {
    margin-top: 3px;
    font-size: 14px;
    line-height: 1.5;
}

.spec-card__title {
    letter-spacing: 0.1em;
}

.spec-list dt {
    font-size: 14px;
}

.spec-list dd {
    font-size: 15px;
    line-height: 1.45;
}

.score-card__copy {
    font-size: 14.5px;
    line-height: 1.55;
}

.audience-card__label {
    letter-spacing: 0.07em;
}

.audience-card__small {
    font-size: 15px !important;
    line-height: 1.5;
}

.breadcrumb {
    font-size: 14.5px;
}

/* --------------------------------------------------------------------------
   4. Compare: empty state, picker, selection
   -------------------------------------------------------------------------- */

.compare-empty__copy p {
    font-size: 17px;
    line-height: 1.55;
}

.compare-empty__steps li {
    min-height: 34px;
    padding: 7px 12px 7px 8px;
    font-size: 14.5px;
}

.compare-empty__steps span {
    width: 22px;
    height: 22px;
    font-size: 13.5px;
}

.compare-hint {
    padding: 12px 15px;
    font-size: 15px;
    line-height: 1.5;
}

.compare-hint .icon {
    width: 16px;
    height: 16px;
}

.selection-chip {
    gap: 7px;
    min-height: 44px;
    padding: 7px 11px;
    font-size: 14px;
}

.selection-chip .icon {
    width: 12px;
    height: 12px;
}

.compare-toolbar__actions .text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14.5px;
}

.compare-picker__summary {
    min-height: 60px;
}

.compare-picker__summary-text strong {
    font-size: 17px;
}

.compare-picker__summary-text small {
    font-size: 14.5px;
}

.compare-picker__status {
    font-size: 14.5px;
}

.compare-picker__status strong {
    font-size: 15px;
}

.compare-picker__none p {
    font-size: 16px;
    line-height: 1.55;
}

.picker__row {
    min-height: 64px;
}

.picker__name a {
    font-size: 16px;
    line-height: 1.3;
}

.picker__name small,
.picker__fee small,
.picker__score small {
    margin-top: 2px;
    font-size: 13.5px;
}

.picker__fee,
.picker__score {
    font-size: 15px;
    line-height: 1.25;
}

.picker__row .btn {
    min-height: 44px;
}

.compare-selected .text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.compare-selected {
    gap: 16px;
}

.compare-selected__name a {
    font-size: 17px;
}

.compare-selected__name small {
    margin-top: 2px;
}

.compare-selected__meta strong {
    font-size: 17px;
}

.compare-foot p {
    font-size: 15px;
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   5. Comparison matrix: aligned numbers, readable descriptions, grouping
   -------------------------------------------------------------------------- */

.cmp-legend {
    gap: 10px;
    padding: 14px 20px;
    font-size: 14.5px;
    line-height: 1.4;
}

.cmp-hint-mobile {
    font-size: 14px;
}

.cmp-hint-mobile .icon {
    width: 14px;
    height: 14px;
}

.cmp-table {
    min-width: 900px;
    font-variant-numeric: tabular-nums;
}

.cmp-corner {
    width: 230px;
    padding: 20px;
    letter-spacing: 0.08em;
}

.cmp-head {
    padding: 16px 18px;
}

.cmp-head__link {
    min-height: 66px;
}

.cmp-head__name {
    font-size: 17px;
    line-height: 1.2;
}

.cmp-head__score {
    font-size: 17px;
}

.cmp-head__meta {
    margin-top: 5px;
    line-height: 1.35;
}

.cmp-group th {
    letter-spacing: 0.1em;
    border-top: 1px solid var(--separator);
}

/* Air between groups: a quiet band, not a second header style. */
.cmp-table tbody + tbody .cmp-group th {
    border-top: 8px solid var(--bg-tertiary);
}

.cmp-group__label {
    padding: 10px 20px;
}

.cmp-group__toggle {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 13.5px;
}

.cmp-group__state {
    color: color-mix(in srgb, var(--blue) 82%, var(--label));
    letter-spacing: 0.01em;
}

.cmp-rowhead {
    width: 230px;
    padding: 16px 20px;
    box-shadow: 1px 0 0 var(--separator);
}

.cmp-label {
    font-size: 15.5px;
    font-weight: var(--weight-medium);
    line-height: 1.4;
}

.cmp-hint {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.cmp-table td {
    padding: 16px 18px;
    font-size: 15.5px;
    line-height: 1.5;
}

.cmp-table td.is-best {
    background: color-mix(in srgb, var(--blue) 7%, var(--bg-tertiary));
}

/* Dark mode needs a stronger tint for the same perceived emphasis. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .cmp-table td.is-best {
        background: color-mix(in srgb, var(--blue) 16%, var(--bg-tertiary));
    }
}

[data-theme="dark"] .cmp-table td.is-best {
    background: color-mix(in srgb, var(--blue) 16%, var(--bg-tertiary));
}

.cmp-table td.is-best .cmp-value {
    color: var(--label);
}

.cmp-value {
    font-weight: var(--weight-medium);
}

.cmp-sub {
    max-width: none;
    margin-top: 5px;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.bool {
    gap: 6px;
    font-size: 15.5px;
}

.bool .icon {
    width: 14px;
    height: 14px;
}

.best-dot {
    width: 6px;
    height: 6px;
    margin-left: 6px;
}

/* Mobile matrix: parameter-first, one plan per row.
   The plan name is the row label; the value is the reading target. */
.cmp-mobile__group summary {
    min-height: 52px;
    padding: 16px;
    font-size: 14.5px;
    letter-spacing: 0.08em;
}

.cmp-mobile__group summary span {
    font-size: 13.5px;
    letter-spacing: 0.01em;
}

.cmp-mobile__body {
    padding: 0 16px 10px;
}

.cmp-mobile__row {
    padding: 16px 0;
}

.cmp-mobile__label strong {
    font-size: 16px;
    line-height: 1.35;
}

.cmp-mobile__label span {
    font-size: 14px;
    line-height: 1.4;
}

.cmp-mobile__cells {
    gap: 8px;
}

.cmp-mobile__cell {
    padding: 12px;
    border-radius: 12px;
    background: var(--fill-4);
    box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--separator) 65%, transparent);
}

.cmp-mobile__cell.is-best {
    background: color-mix(in srgb, var(--blue) 9%, var(--bg-tertiary));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 22%, transparent);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .cmp-mobile__cell.is-best {
        background: color-mix(in srgb, var(--blue) 18%, var(--bg-tertiary));
    }
}

[data-theme="dark"] .cmp-mobile__cell.is-best {
    background: color-mix(in srgb, var(--blue) 18%, var(--bg-tertiary));
}

.cmp-mobile__plan {
    letter-spacing: 0.05em;
    line-height: 1.3;
}

.cmp-mobile__value {
    margin-top: 4px;
    font-size: 17px;
    line-height: 1.35;
}

.cmp-mobile__cell .cmp-sub {
    margin-top: 4px;
    font-size: 14.5px;
}

/* Keyboard users: keep the focus ring visible over sticky surfaces. */
.cmp-head__link:focus-visible,
.cmp-group__toggle:focus-visible,
.cmp-mobile__group summary:focus-visible,
.source-row:focus-visible,
.picker__name a:focus-visible,
.selection-chip:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   6. Preferences
   -------------------------------------------------------------------------- */

@media (prefers-contrast: more) {
    .product-card,
    .cmp-shell,
    .cmp-mobile__cell,
    .insurance-item,
    .source-row,
    .picker__row,
    .compare-selected {
        border: 1px solid var(--separator-opaque);
    }

    .product-card__tagline,
    .product-card__specs dt,
    .stat__sub,
    .fee-row dt small,
    .cmp-hint,
    .cmp-sub,
    .source-row__body small,
    .source-row__body em {
        color: var(--label);
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-card,
    .source-row,
    .cmp-group__toggle {
        transition: none;
    }

    .product-card:hover {
        transform: none;
    }
}
