/* "Similar" tab of conference_page.html (js/similar-conferences.js).
   Wider screens: the pane is a fixed-height box with the header, the filters and a
   scrolling list. Phones: the cards are swiped one at a time, with pagination dots. */

#similar-tab [hidden] {
    display: none !important;
}

/* ---------- header ---------- */
.sim-head {
    width: 100%;
    margin: 0 0 12px;
}

.sim-head .sim-title {
    flex: none;
    margin: 0;
    color: #173b38;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.sim-subtitle {
    margin: 4px 0 0;
    color: #6b7f7c;
    font-size: 0.88rem;
    line-height: 1.4;
}

.sim-subtitle__sep {
    margin: 0 2px;
    color: #b3c2c0;
}

.sim-unhide {
    display: inline;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #0f766e;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(15, 118, 110, 0.35);
    text-underline-offset: 3px;
    cursor: pointer;
}

.sim-unhide:hover,
.sim-unhide:focus-visible {
    outline: none;
    text-decoration-color: currentColor;
}

/* ---------- filters + sort ---------- */
.sim-bar {
    display: flex;
    align-items: flex-start;
    gap: 10px 16px;
    width: 100%;
    margin: 0 0 14px;
}

.sim-bar:not(:has(> :not([hidden]))) {
    display: none;
}

.sim-bar .sim-sort {
    height: 36px;
    margin-left: auto;
}

.sim-filters {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    padding: 2px;
    box-sizing: border-box;
}

.sim-filters::-webkit-scrollbar {
    display: none;
}

.sim-filter {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    min-height: 0;
    margin: 0;
    padding: 0 8px 0 14px;
    border: 1px solid #dbe7e5;
    border-radius: 999px;
    background: #fff;
    color: #3e5552;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.sim-filter:hover {
    border-color: #9fd0c8;
    color: #00695c;
}

.sim-filter:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 161, 145, 0.28);
}

.sim-filter.is-active {
    border-color: #0f766e;
    background: #0f766e;
    color: #fff;
    box-shadow: 0 6px 14px -8px rgba(15, 118, 110, 0.75);
}

.sim-filter__n {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #eef4f3;
    color: #5f7471;
    font-size: 0.7rem;
    font-weight: 700;
}

.sim-filter.is-active .sim-filter__n {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ---------- list ---------- */
.similar-carousel-wrapper {
    position: relative;
    width: 100%;
}

.similar-conferences-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
}

.similar-conferences-list > .similar-prerender,
.similar-conferences-list > .loading-skeleton-container {
    flex: 0 0 auto;
}

.similar-conferences-list.is-ready > .sc {
    animation: scIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.similar-nav-row,
.similar-card-nav {
    display: none;
}

/* ---------- card ---------- */
.sc {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e3ecea;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(16, 42, 40, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.sc:hover {
    border-color: rgba(0, 150, 136, 0.3);
    box-shadow: 0 12px 28px -16px rgba(16, 42, 40, 0.35);
}

.sc:has(.sc-link:focus-visible) {
    outline: 2px solid #11a191;
    outline-offset: 2px;
}

.sc.is-selected {
    border-color: #11a191;
    box-shadow: 0 0 0 3px rgba(17, 161, 145, 0.14), 0 12px 28px -18px rgba(16, 42, 40, 0.35);
}

.sc-main {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    flex: 1 0 auto;
    padding: 18px 20px 16px;
}

.sc-logo {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e3ebea;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(16, 42, 40, 0.06);
}

.sc-logo img {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    padding: 6px;
    box-sizing: border-box;
    object-fit: contain;
}

.sc-body {
    flex: 1;
    min-width: 0;
}

.sc-name {
    margin: 1px 40px 7px 0;
    color: #173b38;
    font-size: 1.06rem;
    font-weight: 650;
    line-height: 1.32;
}

.sc-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

/* The whole card opens the conference; its buttons sit above this layer */
.sc-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
}

.sc-link:focus-visible {
    outline: none;
}

.sc:hover .sc-link {
    color: #00796b;
}

.sc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    color: #566866;
    font-size: 0.86rem;
    font-weight: 500;
}

.sc-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sc-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.sc-meta__item .sc-icon {
    color: #86a39f;
}

.sc-meta .is-tba {
    color: #93a4a1;
    font-style: italic;
}

.sc-rating {
    color: #3d4f4d;
    font-weight: 600;
}

.sc-icon--star,
.sc-meta__item .sc-icon--star {
    color: #f5b301;
    fill: #f5b301;
}

.sc-rating__n {
    margin-left: 2px;
    color: #8a9b99;
    font-weight: 500;
}

.sc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.sc-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid #e4eaea;
    border-radius: 999px;
    background: #f4f7f7;
    color: #4b5b59;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.sc-chip--strong {
    border-color: #c9e8e2;
    background: #eaf7f4;
    color: #00695c;
}

.sc-chip--you {
    border-color: transparent;
    background: linear-gradient(135deg, #14a897, #0c8577);
    color: #fff;
    box-shadow: 0 4px 10px -6px rgba(12, 133, 119, 0.8);
}

.sc-chip--warn {
    border-color: #f5dcae;
    background: #fff6e6;
    color: #96560a;
}

.sc-chip--list {
    border-color: #dbe3ff;
    background: #eff3ff;
    color: #3b55c4;
}

.sc-topics {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 10px;
    margin-top: 10px;
    font-size: 0.8rem;
}

.sc-topics__label {
    color: #8a9b99;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.sc-tag {
    color: #47706b;
    font-weight: 500;
}

.sc-tag--mine,
.sc-tag--shared {
    color: #00796b;
    font-weight: 700;
}

/* Why it's suggested: the chips and shared topics stay folded until "?" opens them */
.sc-why {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.26s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.26s;
}

.sc.is-why-open .sc-why {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}

/* Clips while folded; the bottom padding keeps the chips' shadows */
.sc-why__inner {
    min-height: 0;
    overflow: hidden;
    padding-bottom: 3px;
    margin-bottom: -3px;
}

.sc-why .sc-chip,
.sc-why .sc-topics {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
    transition: opacity 0.14s ease, transform 0.2s ease;
}

.sc.is-why-open .sc-why .sc-chip,
.sc.is-why-open .sc-why .sc-topics {
    opacity: 1;
    transform: none;
    transition: opacity 0.3s ease, transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: calc(0.06s + min(var(--i, 0), 8) * 0.035s);
}

/* "?": beside "Not for me" (phones: the opposite corner) */
.sc-why-btn {
    position: absolute;
    top: 12px;
    right: 48px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9aaba8;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.sc-why-btn .sc-icon {
    width: 19px;
    height: 19px;
    transition: transform 0.15s ease;
}

.sc-why-btn .sc-icon circle {
    fill: transparent;
    transition: fill 0.2s ease;
}

.sc-why-btn .sc-icon path {
    transition: stroke 0.2s ease;
}

/* Open: a solid teal "?" */
.sc-why-btn[aria-expanded="true"] {
    color: #11a191;
}

.sc-why-btn[aria-expanded="true"] .sc-icon circle {
    fill: currentColor;
}

.sc-why-btn[aria-expanded="true"] .sc-icon path {
    stroke: #fff;
}

/* Hover only where there is a pointer: a tap would leave it stuck on phones */
@media (hover: hover) {
    .sc-why-btn:hover {
        background: #e9f6f4;
        color: #0f766e;
    }

    .sc-why-btn[aria-expanded="true"]:hover {
        background: transparent;
        color: #0d8a7c;
    }
}

.sc-why-btn:focus-visible {
    outline: none;
    background: #e9f6f4;
    color: #0f766e;
}

.sc-why-btn:active .sc-icon {
    transform: scale(0.88);
}

/* Its tooltip (data-tip), under the button and lined up with its right edge so it
   stays inside the card; shown on hover after a short beat, and on keyboard focus */
.sc-why-btn::before,
.sc-why-btn::after {
    position: absolute;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-3px);
    transition: opacity 0.1s ease, transform 0.1s ease;
}

.sc-why-btn::after {
    content: attr(data-tip);
    top: calc(100% + 7px);
    right: 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: #0f2f2c;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: 0 10px 22px -10px rgba(15, 47, 44, 0.6);
}

/* The arrow, under the middle of the button */
.sc-why-btn::before {
    content: '';
    top: calc(100% - 3px);
    right: calc(50% - 5px);
    border: 5px solid transparent;
    border-bottom-color: #0f2f2c;
}

@media (hover: hover) {
    .sc-why-btn:hover::before,
    .sc-why-btn:hover::after {
        opacity: 1;
        transform: none;
        transition: opacity 0.14s ease 0.08s, transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) 0.08s;
    }
}

.sc-why-btn:focus-visible::before,
.sc-why-btn:focus-visible::after {
    opacity: 1;
    transform: none;
}

/* "Not for me" */
.sc-dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9aaba8;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.sc-dismiss .sc-icon {
    width: 16px;
    height: 16px;
}

.sc-dismiss:hover,
.sc-dismiss:focus-visible {
    outline: none;
    background: #fdeeee;
    color: #c2412d;
}

@media (hover: hover) and (min-width: 769px) {
    .sc-dismiss,
    .sc-why-btn {
        opacity: 0.55;
    }

    .sc:hover .sc-dismiss,
    .sc-dismiss:focus-visible,
    .sc:hover .sc-why-btn,
    .sc-why-btn:focus-visible,
    .sc-why-btn[aria-expanded="true"] {
        opacity: 1;
    }
}

/* Footer: deadline / fee on the left, the actions on the right */
.sc-foot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 11px 16px 11px 20px;
    border-top: 1px solid #edf3f2;
    border-radius: 0 0 16px 16px;
    background: #fafcfc;
}

.sc-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    min-width: 0;
    color: #4f5f5d;
    font-size: 0.82rem;
}

.sc-fact {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.sc-fact__icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: #11a191;
}

.sc-fact strong {
    color: #1f3b38;
    font-weight: 650;
}

.sc-fact__sub {
    color: #7b8f8d;
}

.sc-fact--deadline.is-soon .sc-fact__icon,
.sc-fact--deadline.is-soon .sc-fact__sub {
    color: #d97706;
}

.sc-fact--deadline.is-soon .sc-fact__sub {
    font-weight: 600;
}

.sc-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.sc-compare,
.similar-write-review {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    min-height: 0;
    margin: 0;
    box-sizing: border-box;
    border-radius: 999px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.sc-compare {
    padding: 0 13px 0 9px;
    border: 1px solid #d3e3e0;
    background: #fff;
    color: #2f4f4b;
}

.sc-compare:hover:not(:disabled) {
    border-color: #9fd0c8;
    color: #00695c;
}

.sc-compare:focus-visible,
.similar-write-review:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 161, 145, 0.28);
}

.sc-compare__box {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 1.5px solid #b3cac6;
    border-radius: 5px;
    color: #fff;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sc-compare__box .sc-icon {
    width: 11px;
    height: 11px;
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.15s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1.4);
}

.sc-compare[aria-pressed="true"] {
    border-color: #11a191;
    background: #ebf8f5;
    color: #00695c;
}

.sc-compare[aria-pressed="true"] .sc-compare__box {
    border-color: #11a191;
    background: #11a191;
}

.sc-compare[aria-pressed="true"] .sc-compare__box .sc-icon {
    opacity: 1;
    transform: none;
}

.sc-compare:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.similar-write-review {
    padding: 0 14px;
    border: 1px solid #11a191;
    background: #11a191;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.similar-write-review:hover {
    border-color: #0d8a7c;
    background: #0d8a7c;
}

.similar-write-review:disabled {
    opacity: 0.6;
    cursor: default;
}

.sc-actions .similar-attendance .att-btn {
    height: 28px;
}

/* Leaving ("Not for me") and coming back (undo) */
.similar-conferences-list > .sc.is-leaving {
    overflow: hidden;
    pointer-events: none;
    animation: scLeave 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.similar-conferences-list > .sc.is-returning {
    animation: scIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes scLeave {
    0% { max-height: var(--sc-height, 400px); opacity: 1; transform: none; }
    45% { max-height: var(--sc-height, 400px); opacity: 0; transform: translateX(28px) scale(0.98); }
    100% { max-height: 0; margin-bottom: -16px; border-width: 0; opacity: 0; transform: translateX(28px) scale(0.98); }
}

@keyframes scIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ---------- "Show more" ---------- */
.sim-more {
    display: flex;
    justify-content: center;
    flex: 0 0 auto;
    padding: 2px 0;
}

.sim-more__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    min-height: 0;
    padding: 0 20px;
    border: 1px dashed #afd3cc;
    border-radius: 999px;
    background: #f5fbfa;
    color: #0f766e;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sim-more__btn:hover,
.sim-more__btn:focus-visible {
    outline: none;
    border-style: solid;
    border-color: #11a191;
    background: #eaf7f4;
}

/* ---------- empty states ---------- */
.sim-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    padding: 40px 24px;
    box-sizing: border-box;
    border: 1px dashed #d4e5e1;
    border-radius: 16px;
    background: radial-gradient(120% 100% at 50% 0%, rgba(17, 161, 145, 0.07), transparent 60%), #fbfdfd;
    text-align: center;
}

.sim-empty__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
    border-radius: 14px;
    background: #e6f5f2;
    color: #0f766e;
}

.sim-empty__icon .sc-icon {
    width: 22px;
    height: 22px;
}

.sim-empty__title {
    margin: 0;
    color: #173b38;
    font-size: 1.02rem;
    font-weight: 700;
}

.sim-empty__text {
    max-width: 440px;
    margin: 0;
    color: #6b7f7c;
    font-size: 0.88rem;
    line-height: 1.5;
}

.sim-empty__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

/* ---------- buttons ---------- */
.sim-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0 16px;
    box-sizing: border-box;
    border: 1px solid #11a191;
    border-radius: 999px;
    background: #11a191;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sim-btn:hover {
    border-color: #0d8a7c;
    background: #0d8a7c;
}

.sim-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 161, 145, 0.3);
}

.sim-btn .sc-icon {
    width: 16px;
    height: 16px;
}

.sim-btn--ghost {
    border-color: #cfe5e1;
    background: #fff;
    color: #0f766e;
}

.sim-btn--ghost:hover {
    border-color: #11a191;
    background: #f1faf8;
}

.sim-btn--quiet {
    border-color: transparent;
    background: transparent;
    color: #bfe3dd;
}

.sim-btn--quiet:hover {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* ---------- compare bar ---------- */
.sim-compare-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    width: 100%;
    margin-top: 12px;
    padding: 9px 10px 9px 14px;
    box-sizing: border-box;
    border-radius: 14px;
    background: #0f2f2c;
    color: #e3f2ef;
    box-shadow: 0 14px 30px -14px rgba(15, 47, 44, 0.7);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sim-compare-bar.is-shown {
    opacity: 1;
    transform: none;
}

.sim-compare-bar__logos {
    display: flex;
    flex-shrink: 0;
}

.sim-compare-bar__logos img {
    width: 30px;
    height: 30px;
    padding: 2px;
    box-sizing: border-box;
    object-fit: contain;
    border: 2px solid #0f2f2c;
    border-radius: 9px;
    background: #fff;
}

.sim-compare-bar__logos img + img {
    margin-left: -8px;
}

.sim-compare-bar__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sim-compare-bar__text strong {
    color: #fff;
}

/* ---------- compare dialog (shell: css/conference-fees.css) ---------- */
.sim-cmp-modal .fee-modal__panel {
    width: min(1000px, 100%);
}

.sim-cmp__scroll {
    overflow-x: auto;
    border: 1px solid #e3e8eb;
    border-radius: 12px;
}

.sim-cmp__table {
    width: 100%;
    min-width: calc(130px + var(--sim-cols, 2) * 180px);
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.86rem;
    line-height: 1.45;
}

.sim-cmp__table th,
.sim-cmp__table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f3;
    text-align: left;
    vertical-align: top;
}

.sim-cmp__table tbody tr:last-child th,
.sim-cmp__table tbody tr:last-child td {
    border-bottom: 0;
}

.sim-cmp__table thead th {
    vertical-align: bottom;
    background: #fff;
}

.sim-cmp__table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 130px;
    background: #f8fafb;
    color: #607d8b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sim-cmp__corner {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    border-bottom: 1px solid #eef2f3;
}

.sim-cmp__table .is-source {
    background: #f2faf8;
}

.sim-cmp__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sim-cmp__head img {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 3px;
    box-sizing: border-box;
    object-fit: contain;
    border: 1px solid #e3ebea;
    border-radius: 10px;
    background: #fff;
}

.sim-cmp__name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    color: #173b38;
    font-weight: 650;
    line-height: 1.3;
}

.sim-cmp__name a {
    min-height: 0;
    color: #0f766e;
    text-decoration: none;
}

.sim-cmp__name a:hover {
    text-decoration: underline;
}

.sim-cmp__pin {
    color: #11a191;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sim-cmp__muted {
    color: #8a9b99;
}

.sim-cmp__muted.is-soon {
    color: #d97706;
    font-weight: 600;
}

.sim-cmp__table .is-tba {
    color: #93a4a1;
    font-style: italic;
}

.sim-cmp__table .sc-icon--star {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: -2px;
}

.sim-cmp__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    font-size: 0.8rem;
}

.sim-cmp__table .sk-line {
    height: 10px;
    margin-top: 4px;
}

/* ---------- undo toast ---------- */
.sim-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 10040;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: calc(100vw - 32px);
    padding: 8px 8px 8px 16px;
    box-sizing: border-box;
    border-radius: 12px;
    background: #0f2f2c;
    color: #e3f2ef;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.88rem;
    box-shadow: 0 18px 38px -16px rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sim-toast.is-shown {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

body:has(.sim-compare-bar.is-shown) .sim-toast {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

.sim-toast__text {
    min-width: 0;
}

.sim-toast__undo {
    flex-shrink: 0;
    height: 32px;
    min-height: 0;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #7ee0d2;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.sim-toast__undo:hover,
.sim-toast__undo:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, 0.18);
}

/* ---------- wider screens: one box under the tabs, as wide as the header card ---------- */
@media (min-width: 769px) {
    /* Closer to the tab bar than the other panes; js/similar-conferences.js grows the
       height into the space above the footer */
    #similar-tab {
        padding: 14px 0 6px;
    }

    .similar-conferences-section {
        width: calc(var(--header-card-width) - 32px);
        max-width: none;
        height: 100%;
        margin: 0 0 0 -284px; /* the pane starts 300px inside the card */
    }

    .similar-conferences-container {
        display: flex;
        flex-direction: column;
        height: 100%;
        box-sizing: border-box;
    }

    .similar-conferences-container > * {
        flex-shrink: 0;
    }

    .similar-carousel-wrapper {
        flex: 1 1 auto;
        min-height: 0;
    }

    .similar-conferences-container > .similar-carousel-wrapper {
        flex-shrink: 1;
    }

    /* 4px around the cards so the selected ring isn't clipped by the scroll box */
    .similar-conferences-list {
        width: calc(100% + 4px);
        height: 100%;
        margin-left: -4px;
        padding: 4px 12px 28px 4px;
        gap: 16px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #b9d9d3 transparent;
        /* Fades into the bottom padding, so the last card shows in full at the end */
        -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
        mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
    }

    .sc-main {
        gap: 20px;
        padding: 22px 24px 20px;
    }

    .sc-logo {
        flex-basis: 80px;
        width: 80px;
        height: 80px;
        border-radius: 16px;
    }

    .sc-logo img {
        padding: 7px;
    }

    .sc-name {
        margin-bottom: 9px;
        font-size: 1.12rem;
    }

    .sc.has-why .sc-name {
        margin-right: 76px;
    }

    /* Compare: at the top, left of the "?" and as tall as it (beside "Not for me" when
       there is no "?"); only the first line of the name wraps around it, the -2px bottom
       margin keeps the second line clear of it */
    .sc-compare {
        position: relative;
        z-index: 1;
        float: right;
        height: 32px;
        margin: -10px 24px -2px 12px;
    }

    .sc.has-why .sc-compare {
        margin-right: 60px;
    }

    .sc-meta {
        gap: 5px 18px;
        font-size: 0.88rem;
    }

    .sc-chips {
        margin-top: 14px;
    }

    .sc-topics {
        margin-top: 12px;
    }

    .sc-foot {
        padding: 13px 18px 13px 24px;
    }

    .similar-conferences-list::-webkit-scrollbar {
        width: 8px;
    }

    /* Line up with the cards, which leave room for the list's scrollbar */
    .sim-bar {
        padding-right: 12px;
        box-sizing: border-box;
    }

    .sim-compare-bar {
        width: calc(100% - 12px);
    }

    .similar-conferences-list::-webkit-scrollbar-thumb {
        border-radius: 4px;
        background: #b9d9d3;
    }

    .similar-conferences-list::-webkit-scrollbar-thumb:hover {
        background: #11a191;
    }
}

/* Tablets: the actions wrap under the facts when the card gets narrow */
@media (min-width: 769px) and (max-width: 1023px) {
    .sc-main {
        gap: 16px;
        padding: 18px 18px 16px;
    }

    .sc-logo {
        flex-basis: 68px;
        width: 68px;
        height: 68px;
    }

    .sc-foot {
        padding: 11px 14px 12px 18px;
    }

    .sc-compare {
        margin-top: -6px;
        margin-right: 30px;
    }

    .sc.has-why .sc-compare {
        margin-right: 66px;
    }
}

/* ---------- phones: one card per swipe ---------- */
@media (max-width: 768px) {
    #similar-tab {
        height: auto;
        min-height: 300px;
    }

    .similar-conferences-section {
        width: 100%;
        margin: 0;
    }

    .sim-head {
        margin-bottom: 12px;
        text-align: center;
    }

    .sim-head .sim-title {
        font-size: 1.15rem;
    }

    .sim-subtitle {
        font-size: 0.82rem;
    }

    .sim-bar {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 12px;
    }

    .sim-bar .sim-sort {
        flex: 0 0 auto;
        height: 44px;
        margin-left: 0;
    }

    .sim-filters {
        flex-wrap: nowrap;
        margin: 0 -12px;
        padding: 2px 12px;
        overflow-x: auto;
        scroll-padding: 0 12px;
        scrollbar-width: none;
    }

    .similar-conferences-list {
        position: relative;
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .similar-conferences-list::-webkit-scrollbar {
        display: none;
    }

    .similar-conferences-list > .sc,
    .similar-conferences-list > .sim-empty,
    .similar-conferences-list > .similar-prerender,
    .similar-conferences-list > .loading-skeleton-container {
        flex: 0 0 100%;
        min-width: 0;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .sc {
        border-radius: 18px;
        box-shadow: 0 2px 10px rgba(16, 42, 40, 0.07);
    }

    .sc:hover {
        box-shadow: 0 2px 10px rgba(16, 42, 40, 0.07);
    }

    .sc:active {
        transform: scale(0.985);
    }

    .sc:has(button:active) {
        transform: none;
    }

    .sc-main {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 20px 2.75rem 14px;
        text-align: center;
    }

    .sc-name {
        margin: 0 0 6px;
        font-size: 1.04rem;
    }

    .sc-meta {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .sc-chips,
    .sc-topics {
        justify-content: center;
    }

    .sc-dismiss {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
    }

    .sc-why-btn {
        top: 8px;
        right: auto;
        left: 8px;
        width: 36px;
        height: 36px;
    }

    .sc-why-btn .sc-icon {
        width: 20px;
        height: 20px;
    }

    .sc-why-btn::after {
        right: auto;
        left: 0;
    }

    .sc-why-btn::before {
        right: auto;
        left: calc(50% - 5px);
    }

    .sc-foot {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 10px 14px;
        border-radius: 0 0 18px 18px;
    }

    .sc-facts {
        justify-content: center;
        text-align: left;
    }

    .sc-actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        margin-left: 0;
    }

    /* The review button and Follow | Registered? share one line */
    .similar-write-review {
        padding: 0 11px;
        font-size: 12px;
    }

    .sc-actions .similar-attendance .att-btn {
        gap: 4px;
        padding: 0 8px;
        font-size: 12px;
    }

    /* Compare: a tick box beside the "?" (in its corner when there is no "?") */
    .sc-compare {
        position: absolute;
        top: 8px;
        left: 8px;
        z-index: 1;
        min-width: 36px;
        height: 36px;
        padding: 0 4px;
        gap: 6px;
        border: 0;
        background: transparent;
        font-size: 12px;
    }

    .sc.has-why .sc-compare {
        left: 44px;
    }

    .sc-compare[aria-pressed="true"] {
        background: transparent;
    }

    @keyframes scLeave {
        0% { opacity: 1; transform: none; }
        100% { opacity: 0; transform: translateY(12px) scale(0.94); }
    }

    /* "Show more" is the carousel's last stop */
    .sim-more {
        flex: 0 0 70%;
        align-items: center;
        scroll-snap-align: start;
    }

    .sim-more__btn {
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        width: 100%;
        height: 100%;
        min-height: 180px;
        border-radius: 18px;
        font-size: 0.95rem;
    }

    .sim-more__btn .sc-icon {
        transform: rotate(-90deg);
    }

    /* Round, frosted previous / next buttons halfway down the card's edges: a tap
       alternative to swiping, the same as on search_for_people.html */
    .similar-card-nav {
        position: absolute;
        top: 50%;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        min-height: 32px;
        padding: 0;
        border: 1px solid rgba(62, 179, 165, 0.35);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.92);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        color: #2d9a8d;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
        cursor: pointer;
        transform: translateY(-50%);
        transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .similar-card-nav--prev { left: 6px; }
    .similar-card-nav--next { right: 6px; }

    .similar-card-nav svg {
        width: 16px;
        height: 16px;
    }

    .similar-card-nav:active {
        background: rgba(62, 179, 165, 0.14);
        transform: translateY(-50%) scale(0.9);
    }

    .similar-card-nav:focus-visible {
        outline: 2px solid #2d9a8d;
        outline-offset: 2px;
    }

    .similar-card-nav[disabled] {
        opacity: 0;
        pointer-events: none;
    }

    .similar-nav-row {
        display: flex;
        justify-content: center;
        width: 100%;
        margin: 14px 0 1px;
    }

    .similar-pagination {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .similar-pagination-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #d8e3e1;
        cursor: pointer;
        transition: background-color 0.2s ease, transform 0.2s ease;
    }

    .similar-pagination-dot.active {
        background: #11a191;
        transform: scale(1.25);
    }

    .similar-pagination.is-dense {
        gap: 5px;
    }

    .similar-pagination.is-dense .similar-pagination-dot {
        width: 6px;
        height: 6px;
    }

    /* The tab's ancestors clip overflow, so sticky never engages; the bar lives in
       #similar-tab, which hides it with the tab */
    .sim-compare-bar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        z-index: 60;
        width: auto;
        margin: 0;
    }

    body:has(.sim-compare-bar.is-shown) .cf-ri-fab {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }

    body:has(.sim-compare-bar.is-shown) footer {
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }

    body:has(.sim-compare-bar.is-shown) .sim-toast {
        bottom: calc(130px + env(safe-area-inset-bottom, 0px));
    }

    /* The iPhone app's back / forward capsule (js/app-nav.js) has the corner below the bar */
    html.cf-has-nav .sim-compare-bar {
        bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    }

    html.cf-has-nav body:has(.sim-compare-bar.is-shown) .cf-ri-fab {
        bottom: calc(132px + env(safe-area-inset-bottom, 0px));
    }

    html.cf-has-nav body:has(.sim-compare-bar.is-shown) footer {
        padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
    }

    html.cf-has-nav body:has(.sim-compare-bar.is-shown) .sim-toast {
        bottom: calc(184px + env(safe-area-inset-bottom, 0px));
    }

    .sim-cmp__table {
        min-width: calc(110px + var(--sim-cols, 2) * 160px);
        font-size: 0.82rem;
    }

    .sim-cmp__table tbody th {
        width: 110px;
    }

    .sim-toast {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

/* Phones: a tap would leave the hover colour on an unticked box */
@media (max-width: 768px) and (hover: none) {
    .sc-compare:not([aria-pressed="true"]):hover {
        color: #2f4f4b;
    }
}

/* Narrower phones: Follow | Registered? drop their icons so the three buttons still
   share one line */
@media (max-width: 379px) {
    .sc-actions .similar-attendance .att-btn-icon {
        display: none;
    }
}

@media (max-width: 359px) {
    .sc-foot {
        padding-right: 8px;
        padding-left: 8px;
    }

    .similar-write-review {
        padding: 0 9px;
        font-size: 11.5px;
    }

    .sc-actions .similar-attendance .att-btn {
        padding: 0 7px;
        font-size: 11.5px;
    }
}

/* Smaller phones: the word gets smaller to stay clear of the logo */
@media (min-width: 360px) and (max-width: 374px) {
    .sc-compare {
        padding: 0 2px;
        gap: 5px;
        font-size: 11px;
    }
}

/* Narrow phones: no room beside the logo for the word, so the tick box shows alone
   (the word stays for screen readers) */
@media (max-width: 359px) {
    .sc-compare__label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sc,
    .sc-why,
    .sc.is-why-open .sc-why,
    .sc-why .sc-chip,
    .sc-why .sc-topics,
    .sc.is-why-open .sc-why .sc-chip,
    .sc.is-why-open .sc-why .sc-topics,
    .sc-why-btn::before,
    .sc-why-btn::after,
    .sc-why-btn:hover::before,
    .sc-why-btn:hover::after,
    .similar-conferences-list.is-ready > .sc,
    .similar-conferences-list > .sc.is-returning,
    .sim-compare-bar,
    .sim-toast {
        animation: none;
        transition: none;
    }
}
