/* Layout and components. Colours come from the --brand-* variables in the theme file. */

body {
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4, .display-5, .display-6 {
    color: var(--brand-dark);
    font-weight: 700;
    letter-spacing: 0;
}

.skip-link {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 2000;
    padding: .5rem 1rem;
    background: #fff;
    border-radius: var(--bs-border-radius);
}

/* ---------- Header ---------- */
.site-header {
    background: #fff;
    box-shadow: 0 1px 0 #E3E5EE, 0 .25rem .75rem rgba(12, 19, 100, .06);
}

.navbar-site {
    background: #fff;
    --bs-navbar-padding-y: .55rem;
    --bs-navbar-color: #191919;
    --bs-navbar-hover-color: var(--brand-primary);
    --bs-navbar-active-color: var(--brand-primary);
    --bs-navbar-toggler-border-color: rgba(12, 19, 100, .25);
}

.navbar-site .navbar-brand {
    color: var(--brand-dark);
    line-height: 1.05;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.45rem;
    font-weight: 400;
    color: var(--brand-navy);
    letter-spacing: -.005em;
}

/* "Independent guide" line under the name, on every page and screen size */
.brand-sub {
    font-size: .7rem;
    color: #3A3F55;
    margin-top: .2rem;
}

.navbar-site .nav-link {
    font-size: .95rem;
    position: relative;
}

@media (min-width: 1200px) {
    .navbar-site .nav-link {
        padding-left: .7rem;
        padding-right: .7rem;
    }

    .navbar-site .nav-link.active {
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-underline-offset: .45em;
    }
}

@media (max-width: 1199.98px) {
    .navbar-site .navbar-collapse {
        padding-bottom: .5rem;
    }

    .navbar-site .nav-link.active {
        border-left: 3px solid var(--brand-primary);
        padding-left: .75rem;
    }
}

@media (max-width: 400px) {
    .brand-name { font-size: 1.2rem; }
    .brand-sub { font-size: .64rem; }
}

/* Static update strip under the header on the home page, like the portal's ticker */
.ticker {
    background: #fff;
    border-bottom: 1px solid #E3E5EE;
    font-size: .875rem;
}

.ticker .container {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-top: .45rem;
    padding-bottom: .45rem;
}

.ticker-label {
    flex: 0 0 auto;
    padding: .1rem .55rem;
    border-radius: .25rem;
    background: var(--brand-dark);
    color: #fff;
    font-weight: 700;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ---------- Home hero ---------- */
.hero-home {
    position: relative;
    background: var(--brand-hero-gradient);
    color: #fff;
    overflow: hidden;
}

.hero-home::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/guilloche.svg") right center / 900px auto no-repeat;
    opacity: .15;
    pointer-events: none;
}

.hero-content {
    position: relative;
    padding-top: 3.5rem;
    padding-bottom: 7rem;
    z-index: 1;
}

.hero-home h1 {
    color: #fff;
    font-weight: 400;
    line-height: 1.2;
}

.hero-home .lead {
    color: rgba(255, 255, 255, .9);
}

.hero-eyebrow {
    display: block;
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .9);
}

.quick-spec {
    background: #fff;
    color: var(--bs-body-color);
    border-radius: var(--bs-border-radius-xl);
    box-shadow: 0 1.25rem 3rem rgba(4, 8, 40, .35);
    padding: 1.5rem;
    position: relative;
}

.quick-spec h2 {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--brand-primary);
}

.quick-spec .spec-num {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.1;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .quick-spec .spec-num { font-size: 1.15rem; }
    .quick-spec-photo { width: 76px; flex-basis: 76px; }
}

.quick-spec .spec-label {
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

.quick-spec .spec-cell {
    background: var(--brand-cream);
    border-radius: var(--bs-border-radius);
    padding: .75rem .9rem;
    height: 100%;
}

.quick-spec-photo {
    width: 96px;
    flex: 0 0 96px;
}

/* Quick links panel overlapping the bottom of the hero */
.quick-links {
    position: relative;
    z-index: 2;
    margin-top: -4.5rem;
    background: #fff;
    border-radius: var(--bs-border-radius-xl) var(--bs-border-radius-xl) 0 0;
    padding: 1.5rem 1.5rem 2.5rem;
}

.quick-links h2 {
    text-align: center;
    color: var(--brand-ink);
    margin-bottom: 1.25rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    height: 100%;
    padding: 1rem 1.1rem;
    border-radius: var(--bs-border-radius-lg);
    background: var(--brand-gold);
    color: var(--brand-ink);
    text-decoration: none;
    line-height: 1.3;
    transition: background-color .15s ease, transform .15s ease;
}

.quick-link:hover,
.quick-link:focus-visible {
    background: #F9E7B8;
    color: var(--brand-dark);
    transform: translateY(-2px);
}

.quick-link .bi {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 2px solid var(--brand-ink);
    border-radius: .6rem;
    font-size: 1.25rem;
}

.quick-link small {
    display: block;
    color: #4A4536;
}

/* ---------- Guide page header: short gradient band with the white title card overlapping it ---------- */
.page-hero {
    background: var(--brand-page-hero-gradient);
    height: 6.5rem;
}

.page-head {
    position: relative;
    z-index: 1;
    margin-top: -4.75rem;
    background: #fff;
    border-radius: var(--bs-border-radius-xl) var(--bs-border-radius-xl) 0 0;
    padding: 1.25rem 2rem .25rem;
}

.page-head h1 {
    color: var(--brand-ink);
    font-weight: 400;
    margin-bottom: .5rem;
}

.page-head .lead {
    font-size: 1.1rem;
    color: #3A3F4B;
    max-width: 52rem;
}

.hero-meta {
    color: var(--bs-secondary-color);
}

.breadcrumb-psp {
    --bs-breadcrumb-divider: "›";
    --bs-breadcrumb-divider-color: #191919;
    --bs-breadcrumb-item-active-color: #4B5060;
    font-size: .9rem;
    padding-bottom: .75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #E3E5EE;
}

.breadcrumb-psp .breadcrumb-item + .breadcrumb-item::before {
    font-weight: 700;
}

.breadcrumb-psp a {
    color: var(--brand-dark);
    text-decoration: underline;
    text-underline-offset: .15em;
}

.breadcrumb-psp .active {
    font-weight: 700;
}

.page-head-wrap + .container {
    padding-top: 1.5rem !important;
}

@media (max-width: 575.98px) {
    .page-hero { height: 4.5rem; }
    .page-head { margin-top: -3rem; padding: 1rem 1rem .25rem; }
    .page-head h1 { font-size: 1.6rem; }
}

/* ---------- Sections ---------- */
.section {
    padding: 4rem 0;
}

.section-sand {
    background: var(--brand-sand);
}

/* Cream "public notice" style section */
.section-cream {
    background: var(--brand-cream);
}

.section-center {
    text-align: center;
}

.section-center .section-lead {
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
}

.section-rule {
    border: 0;
    border-top: 1px solid #DADCE6;
    opacity: 1;
    margin: 0;
}

.section-title {
    margin-bottom: .5rem;
}

.section-kicker {
    color: var(--brand-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .8rem;
    margin-bottom: .5rem;
}

/* ---------- Guide cards: centred service tiles with a navy line, like the portal's service list ---------- */
.guide-card {
    position: relative;
    border: 0;
    border-bottom: 2px solid var(--brand-dark);
    border-radius: 0;
    background: #fff;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: background-color .15s ease, border-color .15s ease;
}

.guide-card:hover,
.guide-card:focus-visible {
    background: var(--brand-primary-soft);
    border-bottom-color: var(--brand-primary);
}

.guide-card .card-body {
    padding: 1.5rem 1rem 2.5rem;
}

.guide-card .card-title {
    color: var(--brand-ink);
    font-weight: 400;
    font-size: 1.2rem;
}

.card-arrow {
    position: absolute;
    right: 50%;
    margin-right: -.6rem;
    bottom: .6rem;
    color: var(--brand-primary);
    font-size: 1.2rem;
    transition: transform .15s ease;
}

.guide-card:hover .card-arrow {
    transform: translateX(4px);
}

.icon-bubble {
    display: inline-grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: .85rem;
    background: var(--brand-cream);
    border: 2px solid var(--brand-gold-dark);
    color: var(--brand-dark);
    font-size: 1.5rem;
}

.visa-card {
    border: 1px solid #DADCE6;
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem;
    background: #fff;
}

.visa-card h3 a {
    color: var(--brand-dark);
    text-decoration: none;
}

.visa-card h3 a:hover {
    color: var(--brand-primary);
}

/* Long dropdowns (foreign visas) split into two columns on desktop */
@media (min-width: 1200px) {
    .dropdown-menu-cols {
        column-count: 2;
        column-gap: 0;
        min-width: 30rem;
    }

    .dropdown-menu-cols li {
        break-inside: avoid;
    }
}

/* ---------- Article ---------- */
.article {
    font-size: 1.0625rem;
    line-height: 1.75;
}

.article > h2,
.article section > h2 {
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    scroll-margin-top: 6rem;
}

.article > h2::after,
.article section > h2::after {
    content: "";
    display: block;
    width: 3rem;
    height: 4px;
    margin-top: .6rem;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--brand-dark), var(--brand-maroon));
}

.article h3 {
    margin-top: 1.75rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.article .intro {
    font-size: 1.15rem;
    color: #3A4256;
}

.article ul li,
.article ol li {
    margin-bottom: .35rem;
}

.toc {
    background: var(--brand-sand);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.toc p {
    font-weight: 700;
    margin-bottom: .5rem;
    color: var(--brand-dark);
}

.toc ol {
    margin: 0;
    padding-left: 1.25rem;
    columns: 2;
    column-gap: 2rem;
}

@media (max-width: 575.98px) {
    .toc ol {
        columns: 1;
    }
}

.toc a {
    text-decoration: none;
}

/* Spec tables */
.spec-table-wrap {
    border: 1px solid rgba(14, 35, 64, .1);
    border-radius: var(--bs-border-radius-lg);
    overflow: hidden;
    margin: 1.25rem 0;
}

.table {
    --bs-table-color: var(--bs-body-color);
}

.table-spec {
    font-size: .98rem;
}

.table-spec th {
    width: 36%;
    background: var(--brand-sand);
    color: var(--brand-dark);
    font-weight: 700;
}

.table-spec td,
.table-spec th {
    padding: .8rem 1rem;
}

.table-spec tr:last-child th,
.table-spec tr:last-child td {
    border-bottom: 0;
}

.table-compare {
    font-size: .92rem;
}

.table-compare thead th {
    background: var(--brand-dark);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.table-compare tbody th {
    font-weight: 700;
    color: var(--brand-dark);
    min-width: 11rem;
}

.table-compare td {
    min-width: 7.5rem;
}

/* Callouts */
.callout {
    border-left: 4px solid;
    border-radius: 0 var(--bs-border-radius-lg) var(--bs-border-radius-lg) 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

.callout-title {
    font-weight: 700;
    margin-bottom: .35rem;
}

.callout-body > :last-child {
    margin-bottom: 0;
}

.callout-official {
    border-color: var(--brand-dark);
    background: var(--brand-official-soft);
}

.callout-official .callout-title {
    color: var(--brand-dark);
}

.callout-tip {
    border-color: var(--brand-accent);
    background: var(--brand-accent-soft);
}

.callout-tip .callout-title {
    color: var(--brand-accent-dark);
}

.callout-warning {
    border-color: var(--brand-danger);
    background: var(--brand-danger-soft);
}

.callout-warning .callout-title {
    color: var(--brand-danger-dark);
}

/* Do / Don't lists */
.dd-card {
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem 1.25rem .75rem;
}

.dd-title {
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: .5rem;
}

.dd-do {
    background: var(--brand-green-soft);
}

.dd-do .dd-title {
    color: var(--brand-green);
}

.dd-dont {
    background: var(--brand-danger-soft);
}

.dd-dont .dd-title {
    color: var(--brand-danger-dark);
}

.dd-list {
    padding-left: 1.1rem;
    font-size: .98rem;
}

/* Sample photos */
.photo-example {
    margin: 0;
    text-align: center;
}

.photo-frame {
    position: relative;
    border-radius: .5rem;
    padding: .4rem;
    background: #fff;
    box-shadow: 0 .25rem .9rem rgba(14, 35, 64, .12);
    border: 3px solid transparent;
}

.is-ok .photo-frame {
    border-color: var(--brand-green);
}

.is-no .photo-frame {
    border-color: var(--brand-danger);
}

.photo-frame svg,
.photo-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 35 / 45;
    border-radius: .25rem;
    outline: 1px solid rgba(14, 35, 64, .12);
}

.photo-badge {
    position: absolute;
    top: -.65rem;
    right: -.65rem;
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 .2rem .5rem rgba(0, 0, 0, .2);
}

.is-ok .photo-badge {
    background: var(--brand-green);
}

.is-no .photo-badge {
    background: var(--brand-danger);
}

.photo-example figcaption {
    margin-top: .6rem;
    font-size: .92rem;
    line-height: 1.4;
}

.is-ok figcaption strong {
    color: var(--brand-green);
}

.is-no figcaption strong {
    color: var(--brand-danger-dark);
}

/* Dimension diagram */
.diagram {
    background: var(--brand-sand);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: center;
}

.diagram img {
    max-width: 100%;
    height: auto;
}

.diagram figcaption {
    font-size: .9rem;
    color: var(--bs-secondary-color);
    margin-top: .5rem;
}

/* Steps */
.steps {
    counter-reset: step;
    list-style: none;
    padding-left: 0;
}

.steps > li {
    position: relative;
    padding-left: 3.25rem;
    margin-bottom: 1.25rem;
}

.steps > li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: .1rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: var(--brand-primary);
}

/* Official image reproduced for reference (official_figure()) */
.official-figure {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fff;
    border: 1px solid rgba(14, 35, 64, .1);
    border-left: 4px solid var(--brand-primary);
    border-radius: 0 var(--bs-border-radius-lg) var(--bs-border-radius-lg) 0;
}

.official-figure-img {
    display: block;
    text-align: center;
}

.official-figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid #DADCE6;
}

.official-figure-narrow img {
    max-width: min(100%, 18rem);
}

.official-figure figcaption {
    margin-top: .65rem;
    font-size: .875rem;
    line-height: 1.5;
    color: var(--bs-secondary-color);
}

.official-figure-title {
    display: block;
    color: var(--brand-dark);
    font-weight: 700;
    margin-bottom: .15rem;
}

.official-figure-credit,
.official-figure-licence {
    display: block;
}

/* ---------- Sidebar ---------- */
.sidebar-sticky {
    position: sticky;
    top: 6rem;
    display: grid;
    gap: 1.25rem;
}

.side-card {
    border: 1px solid rgba(14, 35, 64, .1);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem;
    background: #fff;
}

.side-title {
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: .75rem;
}

.qf-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .45rem 0;
    border-bottom: 1px dashed rgba(14, 35, 64, .12);
    font-size: .93rem;
}

.qf-row:last-child {
    border-bottom: 0;
}

.qf-row dt {
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.qf-row dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
    color: var(--brand-dark);
}

.related-list li a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .25rem;
    text-decoration: none;
    color: var(--brand-dark);
    font-weight: 600;
    border-radius: .4rem;
}

.related-list li a:hover {
    background: var(--brand-primary-soft);
    color: var(--brand-primary-darker);
}

.related-list .bi {
    color: var(--brand-primary);
}

/* CTA card */
.cta-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--bs-border-radius-xl);
    padding: 1.5rem;
    color: #fff;
    background: var(--brand-hero-gradient);
}

.cta-mark {
    position: absolute;
    right: 1.1rem;
    top: 1.1rem;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .7rem;
    background: var(--brand-gold);
    color: var(--brand-dark);
    font-size: 1.35rem;
}

.cta-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: .5rem;
    padding-right: 3.5rem;
    min-height: 2.25rem; /* text starts below the corner mark when the title fits on one line */
}

.cta-text {
    color: rgba(255, 255, 255, .88);
    font-size: .93rem;
}

.cta-wide {
    padding: 2rem 2.25rem;
}

.cta-wide .cta-title {
    font-size: 1.6rem;
}

/* Sources */
.sources-card {
    margin-top: 3rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--bs-border-radius-lg);
    background: var(--brand-official-soft);
}

.sources-card h2 {
    color: var(--brand-dark);
    letter-spacing: .06em;
}

.sources-card li {
    margin-bottom: .35rem;
    font-size: .95rem;
}

/* FAQ: flat rows like the portal's accordions */
.faq-accordion {
    --bs-accordion-border-width: 0;
    --bs-accordion-border-radius: 0;
    --bs-accordion-inner-border-radius: 0;
    --bs-accordion-active-bg: #fff;
    --bs-accordion-active-color: var(--brand-dark);
    --bs-accordion-btn-focus-box-shadow: inset 0 0 0 3px rgba(47, 59, 183, .45);
    --bs-accordion-btn-padding-x: 1rem;
    --bs-accordion-btn-padding-y: 1.1rem;
    border-top: 1px solid #DADCE6;
}

.faq-accordion .accordion-item {
    border-bottom: 1px solid #DADCE6;
}

.faq-accordion .accordion-button {
    font-weight: 400;
    font-size: 1.08rem;
    color: var(--brand-ink);
}

.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--brand-dark);
    font-weight: 700;
    box-shadow: none;
}

.faq-accordion .accordion-body {
    padding-top: 0;
}

.faq-accordion .accordion-body > :last-child {
    margin-bottom: 0;
}

/* ---------- Footer: navy to maroon band, white link columns, centred bottom bar ---------- */
.site-footer {
    margin-top: 5rem;
    color: rgba(255, 255, 255, .88);
    background: var(--brand-hero-gradient);
}

.footer-body {
    padding: 3rem 0 1.25rem;
}

.footer-brand {
    font-size: 1.35rem;
    color: #fff;
}

.footer-heading {
    color: #fff;
    font-weight: 700;
    margin-bottom: .75rem;
}

.footer-links li {
    margin-bottom: .4rem;
    font-size: .93rem;
}

.footer-links a {
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-rule {
    border-color: rgba(255, 255, 255, .3);
    opacity: 1;
    margin: 2rem 0 1.25rem;
}

.footer-disclaimer {
    color: rgba(255, 255, 255, .85);
    max-width: 62rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.footer-tools {
    margin-top: 2rem;
}
.footer-tools-list {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem;
}
.footer-tools-list:last-child {
    margin-bottom: 0;
}
.footer-tools-label {
    font-weight: 700;
    font-size: .93rem;
    margin: .5rem 0 .5rem;
}

.footer-bottom {
    text-align: center;
    font-size: .85rem;
    padding: .9rem 0;
    background: rgba(0, 0, 0, .22);
    color: #fff;
}

.footer-bottom a {
    color: #fff;
}

/* ---------- Print ---------- */
@media print {
    .ticker,
    .site-header,
    .site-footer,
    .sidebar-sticky,
    .cta-card,
    .page-hero {
        display: none !important;
    }

    .page-head {
        margin-top: 0;
        padding: 0;
    }
}

/* ---------- Quick answer (featured snippets, voice and AI answers) ---------- */
.answer-box {
    border: 1px solid var(--bs-primary-border-subtle);
    border-left: .35rem solid var(--brand-primary);
    background: var(--brand-official-soft);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.1rem 1.25rem;
    margin: 0 0 1.75rem;
}
.answer-kicker {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand-accent);
    margin-bottom: .25rem;
}
.article .answer-box .answer-q {
    font-size: 1.15rem;
    margin: 0 0 .4rem;
    padding: 0;
}
.article .answer-box .answer-q::after { display: none; }
.answer-a { font-size: 1.05rem; line-height: 1.6; }

/* ---------- Ratings ---------- */
.stars-static {
    --rating: 0;
    position: relative;
    display: inline-block;
    font-family: bootstrap-icons;
    font-size: 1rem;
    line-height: 1;
    letter-spacing: .12em;
    color: #A9AEBB;
    vertical-align: -.1em;
}
.stars-static::before { content: "\f586\f586\f586\f586\f586"; }
.stars-static::after {
    content: "\f586\f586\f586\f586\f586";
    position: absolute;
    inset: 0 auto 0 0;
    width: calc(var(--rating) / 5 * 100%);
    overflow: hidden;
    white-space: nowrap;
    color: #D9A100;
}
.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem .65rem;
    border-radius: 999px;
    background: var(--brand-primary-soft);
    color: var(--brand-dark);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
}
.rating-badge:hover { background: #DDE1F7; color: var(--brand-dark); }
.rating-badge-count { font-weight: 400; opacity: .85; }
.rating-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem 1.5rem;
    margin: 2.5rem 0 1.25rem;
    background: var(--brand-sand);
}
.article .rating-card h2 { font-size: 1.15rem; font-weight: 800; margin: 0 0 .25rem; padding: 0; }
.article .rating-card h2::after { display: none; }
.rating-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.rating-form .rating-msg { flex-basis: 100%; }
.rating-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Half-star input: nine radios laid out right-to-left so "checked ~ label" fills the lower values. */
.star-input {
    display: inline-flex;
    flex-direction: row-reverse;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 2rem;
    line-height: 1;
}
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label {
    position: relative;
    display: block;
    width: .5em;
    height: 1em;
    overflow: hidden;
    cursor: pointer;
    color: #C9CED6;
}
.star-input label.star-full { width: 1em; }
.star-input label::before {
    content: "\f586";
    font-family: bootstrap-icons;
    position: absolute;
    top: 0;
    line-height: 1;
}
.star-input label.star-full::before,
.star-input label.star-left::before { left: 0; }
.star-input label.star-right::before { right: 0; }
.star-input label.star-full,
.star-input label.star-right { margin-right: .12em; }
.star-input input:checked ~ label { color: #D9A100; }
.star-input:hover label { color: #C9CED6; }
.star-input label:hover,
.star-input label:hover ~ label { color: #E9B92E; }
.star-input input:focus-visible + label { outline: 2px solid var(--brand-primary); outline-offset: 2px; border-radius: 2px; }

/* ---------- Share links ---------- */
.share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    margin: 0 0 1.5rem;
}
.share-title { font-weight: 700; font-size: .95rem; }
.share-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .7rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    background: #fff;
    color: var(--brand-ink);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
}
.share-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary-dark); }
.share-btn .bi { font-size: 1rem; }
@media (max-width: 575.98px) {
    .share-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .share-btn { padding: .5rem .65rem; }
}

/* Photos under a how-to step: AI scene photos and small samples with their badge */
.step-media {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    margin: .85rem 0 1.5rem;
}

.step-media figure {
    margin: 0;
}

.step-media .photo-example {
    width: 7.5rem;
}

.step-media .photo-example figcaption,
.step-scene figcaption {
    margin-top: .45rem;
    font-size: .85rem;
    line-height: 1.35;
    color: var(--bs-secondary-color);
}

.step-scene {
    flex: 1 1 18rem;
    max-width: 26rem;
}

.step-scene-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: .5rem;
    box-shadow: 0 .25rem .9rem rgba(0, 0, 0, .12);
}
