/* ============================================================
   Railroading 101 — Main Stylesheet
   CxQ BEM prefix: cxq-rr101-
   ============================================================ */

/* ── Reset & Variables ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --rr101-black:       #0f1014;
    --rr101-charcoal:    #1d2130;
    --rr101-steel:       #2e3a52;
    --rr101-blue:        #3a6fa8;
    --rr101-blue-light:  #5489c4;
    --rr101-accent:      #c8703a;
    --rr101-white:       #ffffff;
    --rr101-gray-50:     #f7f8fa;
    --rr101-gray-100:    #eef0f3;
    --rr101-gray-200:    #d8dce4;
    --rr101-gray-400:    #8b95a8;
    --rr101-gray-600:    #555f72;
    --rr101-gray-800:    #2d3344;
    --rr101-text:        #1d2130;
    --rr101-text-light:  #555f72;
    --rr101-radius:      6px;
    --rr101-shadow:      0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
    --rr101-shadow-md:   0 4px 12px rgba(0,0,0,.1);
    --rr101-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --rr101-font-mono:   'SF Mono', 'Fira Code', 'Consolas', monospace;
    --rr101-max-width:   1100px;
    --rr101-content-width: 780px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--rr101-font);
    color: var(--rr101-text);
    background: var(--rr101-gray-50);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--rr101-blue); text-decoration: none; }
a:hover { color: var(--rr101-blue-light); text-decoration: underline; }

/* ── Layout Helpers ────────────────────────────────────────── */
.cxq-rr101-container {
    max-width: var(--rr101-max-width);
    margin: 0 auto;
    padding: 2rem 1.25rem;
}
.cxq-rr101-container--narrow {
    max-width: var(--rr101-content-width);
}

/* ── Header ────────────────────────────────────────────────── */
.cxq-rr101-header {
    background: var(--rr101-charcoal);
    color: var(--rr101-white);
    border-bottom: 3px solid var(--rr101-accent);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--rr101-shadow-md);
}
.cxq-rr101-header__inner {
    max-width: var(--rr101-max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 60px;
    flex-wrap: wrap;
}
.cxq-rr101-header__logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    flex-shrink: 0;
}
.cxq-rr101-header__logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--rr101-white);
    letter-spacing: -.01em;
}
.cxq-rr101-header__tagline {
    font-size: .7rem;
    color: var(--rr101-gray-400);
    font-style: italic;
}

/* ── Nav ───────────────────────────────────────────────────── */
.cxq-rr101-nav {
    flex: 1;
    overflow: visible;
}
.cxq-rr101-nav__list {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    gap: .1rem;
    align-items: center;
}
.cxq-rr101-nav__link {
    display: block;
    padding: .4rem .7rem;
    color: var(--rr101-gray-200);
    font-size: .85rem;
    font-weight: 500;
    border-radius: var(--rr101-radius);
    white-space: nowrap;
    transition: background .15s, color .15s;
    text-decoration: none;
}
.cxq-rr101-nav__link:hover,
.cxq-rr101-nav__link.is-active {
    background: var(--rr101-steel);
    color: var(--rr101-white);
    text-decoration: none;
}


/* ── Header Search ─────────────────────────────────────────── */
.cxq-rr101-search-form {
    display: flex;
    border-radius: var(--rr101-radius);
    overflow: hidden;
    flex-shrink: 0;
}
.cxq-rr101-search-form__input {
    padding: .4rem .75rem;
    border: none;
    background: var(--rr101-steel);
    color: var(--rr101-white);
    font-size: .85rem;
    width: 180px;
    outline: none;
}
.cxq-rr101-search-form__input::placeholder { color: var(--rr101-gray-400); }
.cxq-rr101-search-form__input:focus { background: #3d4e6a; }
.cxq-rr101-search-form__btn {
    padding: .4rem .6rem;
    background: var(--rr101-accent);
    color: var(--rr101-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background .15s;
}
.cxq-rr101-search-form__btn:hover { background: #b5622e; }

/* Mobile nav toggle */
.cxq-rr101-nav__toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    margin-left: auto;
}
.cxq-rr101-nav__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--rr101-white);
    border-radius: 2px;
    transition: transform .2s;
}

/* ── Main ──────────────────────────────────────────────────── */
.cxq-rr101-main { min-height: calc(100vh - 120px); }

/* ── Footer ────────────────────────────────────────────────── */
.cxq-rr101-footer {
    background: var(--rr101-charcoal);
    color: var(--rr101-gray-400);
    padding: 1.5rem;
    text-align: center;
    font-size: .8rem;
    border-top: 1px solid var(--rr101-steel);
}

/* ── Hero ──────────────────────────────────────────────────── */
.cxq-rr101-hero {
    background: linear-gradient(135deg, var(--rr101-charcoal) 0%, var(--rr101-steel) 100%);
    color: var(--rr101-white);
    padding: 4rem 1.25rem;
    text-align: center;
}
.cxq-rr101-hero__inner { max-width: 680px; margin: 0 auto; }
.cxq-rr101-hero__title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -.02em;
    margin-bottom: .5rem;
}
.cxq-rr101-hero__sub {
    color: var(--rr101-gray-200);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}
.cxq-rr101-hero__search {
    display: flex;
    max-width: 500px;
    margin: 0 auto 1.25rem;
    border-radius: var(--rr101-radius);
    overflow: hidden;
    box-shadow: var(--rr101-shadow-md);
}
.cxq-rr101-hero__search-input {
    flex: 1;
    padding: .85rem 1.1rem;
    border: none;
    font-size: 1rem;
    color: var(--rr101-text);
    outline: none;
}
.cxq-rr101-hero__search-btn {
    padding: .85rem 1.5rem;
    background: var(--rr101-accent);
    color: var(--rr101-white);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.cxq-rr101-hero__search-btn:hover { background: #b5622e; }
.cxq-rr101-hero__dict-link {
    color: var(--rr101-gray-200);
    font-size: .9rem;
    display: inline-block;
}
.cxq-rr101-hero__dict-link:hover { color: var(--rr101-white); text-decoration: underline; }

/* ── Homepage content ──────────────────────────────────────── */
.cxq-rr101-home-content__inner {
    max-width: var(--rr101-max-width);
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
.cxq-rr101-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--rr101-gray-800);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--rr101-gray-200);
}

/* ── Category grid ─────────────────────────────────────────── */
.cxq-rr101-category-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
}
.cxq-rr101-category-grid--small {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .5rem;
}
.cxq-rr101-category-card__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1rem;
    background: var(--rr101-white);
    border: 1px solid var(--rr101-gray-200);
    border-radius: var(--rr101-radius);
    color: var(--rr101-text);
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
    box-shadow: var(--rr101-shadow);
}
.cxq-rr101-category-card__link:hover {
    border-color: var(--rr101-blue);
    box-shadow: 0 2px 8px rgba(58,111,168,.15);
    text-decoration: none;
    color: var(--rr101-blue);
}
.cxq-rr101-category-card__count {
    font-size: .75rem;
    background: var(--rr101-gray-100);
    color: var(--rr101-gray-600);
    padding: .15rem .45rem;
    border-radius: 99px;
    flex-shrink: 0;
}

/* ── Entry list ────────────────────────────────────────────── */
.cxq-rr101-entry-list { list-style: none; }
.cxq-rr101-entry-list__item {
    padding: .9rem 0;
    border-bottom: 1px solid var(--rr101-gray-100);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem;
}
.cxq-rr101-entry-list__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rr101-blue);
}
.cxq-rr101-entry-list__excerpt {
    width: 100%;
    font-size: .875rem;
    color: var(--rr101-text-light);
    margin-top: .15rem;
}

/* ── Badges & Tags ─────────────────────────────────────────── */
.cxq-rr101-badge {
    display: inline-block;
    padding: .2rem .55rem;
    background: var(--rr101-gray-100);
    color: var(--rr101-gray-600);
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--rr101-gray-200);
    white-space: nowrap;
}
.cxq-rr101-badge:hover { background: var(--rr101-gray-200); color: var(--rr101-text); text-decoration: none; }
.cxq-rr101-badge--small { font-size: .7rem; padding: .1rem .4rem; }
.cxq-rr101-tag {
    display: inline-block;
    padding: .2rem .55rem;
    background: var(--rr101-gray-50);
    color: var(--rr101-gray-600);
    border-radius: var(--rr101-radius);
    font-size: .75rem;
    border: 1px solid var(--rr101-gray-200);
}

/* ── Breadcrumb ────────────────────────────────────────────── */
.cxq-rr101-breadcrumb { margin-bottom: 1.5rem; }
.cxq-rr101-breadcrumb__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    font-size: .83rem;
    color: var(--rr101-gray-400);
}
.cxq-rr101-breadcrumb__item + .cxq-rr101-breadcrumb__item::before {
    content: '/';
    margin-right: .25rem;
    color: var(--rr101-gray-400);
}
.cxq-rr101-breadcrumb__item--current { color: var(--rr101-text-light); }
.cxq-rr101-breadcrumb__item a { color: var(--rr101-gray-400); }
.cxq-rr101-breadcrumb__item a:hover { color: var(--rr101-blue); }

/* ── Entry page ────────────────────────────────────────────── */
.cxq-rr101-page-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -.02em;
    color: var(--rr101-gray-800);
}
.cxq-rr101-page-intro {
    color: var(--rr101-text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
}
.cxq-rr101-entry__header { margin-bottom: 2rem; }
.cxq-rr101-entry__title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--rr101-gray-800);
    margin-bottom: .75rem;
}
.cxq-rr101-entry__meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.cxq-rr101-entry__content {
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: var(--rr101-content-width);
    color: var(--rr101-text);
}
.cxq-rr101-entry__content p { margin: 1em 0; }
.cxq-rr101-entry__content h2,
.cxq-rr101-entry__content h3 {
    font-weight: 700;
    margin: 1.5em 0 .5em;
    color: var(--rr101-gray-800);
}
.cxq-rr101-entry__content h2 { font-size: 1.4rem; }
.cxq-rr101-entry__content h3 { font-size: 1.15rem; }
.cxq-rr101-entry__content ul,
.cxq-rr101-entry__content ol {
    padding-left: 1.5rem;
    margin: .75em 0;
}
.cxq-rr101-entry__content li { margin: .3em 0; }
.cxq-rr101-entry__content a { color: var(--rr101-blue); }
.cxq-rr101-entry__content img { max-width: 100%; border-radius: var(--rr101-radius); height: auto; }
.cxq-rr101-entry__content mark { background: #fff3cd; padding: .05em .2em; border-radius: 2px; }
.cxq-rr101-entry__content h1 {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 1.75em 0 .5em;
    color: var(--rr101-gray-800);
    border-bottom: 2px solid var(--rr101-accent);
    padding-bottom: .35em;
}
.cxq-rr101-entry__content strong { font-weight: 600; }
.cxq-rr101-entry__content em { font-style: italic; color: var(--rr101-text-light); }

/* ── Entry content tables ──────────────────────────────────── */

/* Scroll wrapper — breaks out of the 780px content column */
.cxq-rr101-entry__content .cxq-rr101-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem -1rem 2rem;
    border-radius: var(--rr101-radius);
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    border: 1px solid var(--rr101-gray-200);
}
@media (min-width: 860px) {
    .cxq-rr101-entry__content .cxq-rr101-table-wrap {
        margin-left: -2rem;
        margin-right: -2rem;
    }
}

.cxq-rr101-entry__content table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    background: var(--rr101-white);
    min-width: 560px;
}
.cxq-rr101-entry__content .cxq-rr101-table-wrap table {
    min-width: 620px;
}

/* ── Column header row ── */
.cxq-rr101-entry__content table thead th {
    background: var(--rr101-charcoal);
    color: var(--rr101-white);
    font-weight: 700;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: center;
    padding: .75rem 1rem;
    border-right: 1px solid rgba(255,255,255,.1);
    white-space: nowrap;
}
.cxq-rr101-entry__content table thead th:first-child {
    text-align: left;
    background: var(--rr101-black);
    border-right-color: rgba(255,255,255,.15);
    min-width: 160px;
}
.cxq-rr101-entry__content table thead th:last-child {
    border-right: none;
}
/* Railroad name links in header */
.cxq-rr101-entry__content table thead th a {
    color: var(--rr101-white);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,255,255,.45);
    transition: border-color .15s;
}
.cxq-rr101-entry__content table thead th a:hover {
    border-bottom-color: var(--rr101-accent);
    text-decoration: none;
}

/* ── Row label column (tbody th) ── */
.cxq-rr101-entry__content table tbody th {
    background: var(--rr101-gray-100);
    color: var(--rr101-steel);
    font-weight: 600;
    font-size: .85rem;
    padding: .7rem 1rem;
    text-align: left;
    border-top: 1px solid var(--rr101-gray-200);
    border-right: 2px solid var(--rr101-gray-200);
    white-space: nowrap;
    vertical-align: middle;
}

/* ── Data cells ── */
.cxq-rr101-entry__content table td {
    padding: .65rem .9rem;
    text-align: center;
    border-top: 1px solid var(--rr101-gray-200);
    border-right: 1px solid var(--rr101-gray-200);
    vertical-align: middle;
    line-height: 1.45;
    font-size: .88rem;
    color: var(--rr101-text);
}
.cxq-rr101-entry__content table td:last-child {
    border-right: none;
}

/* Alternating rows */
.cxq-rr101-entry__content table tbody tr:nth-child(even) td {
    background: var(--rr101-gray-50);
}
.cxq-rr101-entry__content table tbody tr:nth-child(even) th {
    background: #e6e9ee;
}
.cxq-rr101-entry__content table tbody tr:hover td {
    background: #deeaf8;
}
.cxq-rr101-entry__content table tbody tr:hover th {
    background: #d4dae3;
}

/* Empty cells — show a subtle em-dash */
.cxq-rr101-entry__content table td:empty::after {
    content: '—';
    color: var(--rr101-gray-400);
}

/* small text inside cells */
.cxq-rr101-entry__content table td small,
.cxq-rr101-entry__content table th small {
    display: block;
    font-weight: 400;
    font-size: .78rem;
    color: var(--rr101-gray-600);
    margin-top: .15rem;
}
.cxq-rr101-entry__footer {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rr101-gray-200);
}
.cxq-rr101-entry__date { font-size: .8rem; color: var(--rr101-gray-400); }

/* ── Dictionary page ───────────────────────────────────────── */
.cxq-rr101-az-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 2.5rem;
}
.cxq-rr101-az-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--rr101-white);
    border: 1px solid var(--rr101-gray-200);
    border-radius: var(--rr101-radius);
    font-weight: 700;
    font-size: .85rem;
    color: var(--rr101-blue);
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.cxq-rr101-az-nav__link:hover {
    background: var(--rr101-blue);
    border-color: var(--rr101-blue);
    color: var(--rr101-white);
    text-decoration: none;
}
.cxq-rr101-dict-section { margin-bottom: 2.5rem; }
.cxq-rr101-dict-section__letter {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--rr101-accent);
    border-bottom: 2px solid var(--rr101-gray-200);
    padding-bottom: .4rem;
    margin-bottom: .75rem;
}
.cxq-rr101-dict-list { list-style: none; }
.cxq-rr101-dict-list__item {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    padding: .4rem 0;
    border-bottom: 1px solid var(--rr101-gray-100);
    flex-wrap: wrap;
}
.cxq-rr101-dict-list__title { font-weight: 500; }

/* ── Search results ────────────────────────────────────────── */
.cxq-rr101-search-page-form {
    display: flex;
    max-width: 500px;
    margin-bottom: 2rem;
    border-radius: var(--rr101-radius);
    overflow: hidden;
    border: 1px solid var(--rr101-gray-200);
}
.cxq-rr101-search-page-form__input {
    flex: 1;
    padding: .75rem 1rem;
    border: none;
    font-size: 1rem;
    outline: none;
}
.cxq-rr101-search-page-form__btn {
    padding: .75rem 1.25rem;
    background: var(--rr101-blue);
    color: var(--rr101-white);
    border: none;
    cursor: pointer;
    font-weight: 600;
}
.cxq-rr101-search-results__count { color: var(--rr101-text-light); font-size: .9rem; margin-bottom: 1rem; }
.cxq-rr101-search-results__list { list-style: none; }
.cxq-rr101-search-result {
    padding: 1rem 0;
    border-bottom: 1px solid var(--rr101-gray-100);
}
.cxq-rr101-search-result__title { font-size: 1.1rem; font-weight: 600; }
.cxq-rr101-search-result__snippet {
    font-size: .875rem;
    color: var(--rr101-text-light);
    margin-top: .35rem;
}

/* ── Pagination ────────────────────────────────────────────── */
.cxq-rr101-pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    justify-content: center;
}
.cxq-rr101-pagination__btn {
    padding: .5rem 1.1rem;
    background: var(--rr101-white);
    border: 1px solid var(--rr101-gray-200);
    border-radius: var(--rr101-radius);
    font-size: .875rem;
    color: var(--rr101-blue);
    text-decoration: none;
    transition: background .15s;
}
.cxq-rr101-pagination__btn:hover { background: var(--rr101-gray-100); text-decoration: none; }
.cxq-rr101-pagination__info { font-size: .875rem; color: var(--rr101-text-light); }

/* ── Auth pages ────────────────────────────────────────────── */
.cxq-rr101-body--auth { background: var(--rr101-charcoal); }
.cxq-rr101-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.cxq-rr101-auth-box {
    background: var(--rr101-white);
    border-radius: 10px;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.cxq-rr101-auth-box__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rr101-gray-800);
    margin-bottom: .25rem;
}
.cxq-rr101-auth-box__sub {
    color: var(--rr101-text-light);
    font-size: .875rem;
    margin-bottom: 1.5rem;
}

/* ── Form fields ───────────────────────────────────────────── */
.cxq-rr101-form-field { margin-bottom: 1.1rem; }
.cxq-rr101-form-field__label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--rr101-gray-600);
    margin-bottom: .35rem;
}
.cxq-rr101-form-field__hint {
    font-weight: 400;
    font-size: .78rem;
    color: var(--rr101-gray-400);
    margin-left: .5rem;
}
.cxq-rr101-form-field__input {
    display: block;
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--rr101-gray-200);
    border-radius: var(--rr101-radius);
    font-size: .95rem;
    color: var(--rr101-text);
    background: var(--rr101-white);
    outline: none;
    transition: border-color .15s;
    font-family: var(--rr101-font);
}
.cxq-rr101-form-field__input:focus { border-color: var(--rr101-blue); box-shadow: 0 0 0 3px rgba(58,111,168,.12); }
.cxq-rr101-form-field__input--textarea { resize: vertical; }
.cxq-rr101-form-field__input--short { min-height: 70px; }
.cxq-rr101-form-field__input--tall { min-height: 420px; font-family: var(--rr101-font-mono); font-size: .875rem; }
.cxq-rr101-form-field__input--code { font-size: 1.4rem; letter-spacing: .3em; text-align: center; }

/* ── Buttons ───────────────────────────────────────────────── */
.cxq-rr101-btn {
    display: inline-block;
    padding: .55rem 1.1rem;
    border: 1px solid var(--rr101-gray-200);
    border-radius: var(--rr101-radius);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--rr101-white);
    color: var(--rr101-text);
    text-decoration: none;
    transition: background .15s, border-color .15s;
    font-family: var(--rr101-font);
    line-height: 1.4;
}
.cxq-rr101-btn:hover { background: var(--rr101-gray-100); text-decoration: none; }
.cxq-rr101-btn--primary {
    background: var(--rr101-blue);
    border-color: var(--rr101-blue);
    color: var(--rr101-white);
}
.cxq-rr101-btn--primary:hover { background: var(--rr101-blue-light); border-color: var(--rr101-blue-light); color: var(--rr101-white); }
.cxq-rr101-btn--danger { background: #dc3545; border-color: #dc3545; color: #fff; }
.cxq-rr101-btn--danger:hover { background: #c82333; border-color: #c82333; }
.cxq-rr101-btn--full { width: 100%; text-align: center; display: block; margin-top: .5rem; }
.cxq-rr101-btn-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .85rem;
    color: var(--rr101-blue);
    padding: 0;
    font-family: var(--rr101-font);
    text-decoration: underline;
}
.cxq-rr101-btn-link--danger { color: #dc3545; }
.cxq-rr101-btn-link--danger:hover { color: #a00; }

/* ── Alerts ────────────────────────────────────────────────── */
.cxq-rr101-alert {
    padding: .85rem 1rem;
    border-radius: var(--rr101-radius);
    margin-bottom: 1rem;
    font-size: .9rem;
}
.cxq-rr101-alert--error { background: #fef0ef; border: 1px solid #f5c6c2; color: #721c24; }
.cxq-rr101-alert ul { padding-left: 1.25rem; }

/* ── Misc ──────────────────────────────────────────────────── */
.cxq-rr101-empty { color: var(--rr101-text-light); font-style: italic; }
.required { color: #dc3545; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .cxq-rr101-nav__toggle { display: flex; }
    .cxq-rr101-nav {
        width: 100%;
        order: 3;
        overflow: hidden;
        max-height: 0;
        transition: max-height .3s;
    }
    .cxq-rr101-nav.is-open { max-height: 800px; }
    .cxq-rr101-nav__list { flex-direction: column; padding: .5rem 0 1rem; gap: 0; flex-wrap: wrap; }
    .cxq-rr101-search-form { order: 4; width: 100%; margin-bottom: .75rem; }
    .cxq-rr101-search-form__input { width: 100%; }
    .cxq-rr101-header__inner { flex-wrap: wrap; }
}

/* ── Video Embed ──────────────────────────────────────────── */

.cxq-rr101-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    margin: 1.5rem 0;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}

.cxq-rr101-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
