/* The Roch Society theme. Loaded after Casper's built/screen.css and overrides its chrome:
   paper and ink colours, Fraunces display type, the nameplate, the navbar, the cards,
   the article header, the Join the Society band and the footer. Casper's content and
   editor-card styles (gh-content, kg-*) are kept underneath. */

:root {
    --paper: #FBF8F2;
    --paper-2: #F3EEE2;
    --ink: #1C1A17;
    --ink-2: #45413B;
    --muted: #78726A;
    --rule: #E5E0D8;
    --bronze: #7A5E3A;
    --gold: #B3951A;
    --gold-2: #C5A647;
    --dark: #161513;

    --font-display: "EB Garamond", Georgia, "Times New Roman", serif;
    --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
    --font-sans: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;

    --color-darkgrey: var(--ink);
    --color-secondary-text: var(--muted);
    --color-border: var(--rule);
    --color-lightgrey: var(--paper-2);
}

html { background: var(--paper); }
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.site-content { background: var(--paper); }
iframe[title="portal-trigger"] { display: none !important; }

/* Balanced line breaks: no title or paragraph ends on a two-word orphan line (house rule) */
.rs-hero-title, .rs-card-title, .article-title, .rs-section-title, .rs-page-title, .rs-join-title, .kc-title,
.rs-hero-excerpt, .rs-card-excerpt, .article-excerpt, .rs-page-sub, .rs-section-sub, .rs-join-sub, .rs-nameplate-line,
.gh-content > [id], .gh-content > p, .gh-content > li, .gh-content > ul > li, .gh-content > ol > li, .gh-content > blockquote { text-wrap: balance; }
.rs-kali-lead, .rs-kali-grid p, .rs-kali-title, .rs-joinpage-perk p, .rs-joinpage-perk h3, .rs-joinpage-close p, .rs-signup-msg { text-wrap: balance; }

.rs-nameplate-h1 { margin: 0; line-height: 0; font-size: inherit; }
.rs-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Shared type pieces
/* ---------------------------------------------------------- */

.rs-eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
}
.rs-eyebrow:hover { color: var(--ink); }
.rs-eyebrow-light { color: var(--gold-2); }
.rs-eyebrow-light:hover { color: #fff; }

.rs-card-meta {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 14px 0 0;
}
.rs-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--gold);
    margin: 0 10px;
    vertical-align: middle;
}

.rs-btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 16px 28px;
    border-radius: 3px;
    text-decoration: none;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease;
}
.rs-btn-gold { background: var(--gold-2); color: var(--ink); }
.rs-btn-gold:hover { background: #D6B85C; color: var(--ink); }

/* Nameplate (home only): the masthead
/* ---------------------------------------------------------- */

.rs-nameplate {
    padding-top: 26px;
    padding-bottom: 20px;
    text-align: center;
}
.rs-nameplate-logo { display: inline-block; }
.rs-nameplate-logo img {
    display: block;
    width: min(400px, 72vw);
    height: auto;
}
.rs-nameplate-line {
    margin: 6px 0 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--ink);
}
.rs-nameplate-sub {
    margin: 12px auto 0;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.rs-nameplate-sub::before,
.rs-nameplate-sub::after {
    content: "";
    width: 36px;
    height: 1px;
    background: var(--gold);
}

/* Utility bar (home only): tagline left, search and membership right
/* ---------------------------------------------------------- */

.rs-utility { border-bottom: 1px solid var(--rule); }
.rs-utility-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
}
.rs-utility-line {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-2);
}
.rs-utility-left { display: flex; align-items: center; gap: 18px; }
.rs-utility-social { display: flex; align-items: center; gap: 16px; padding-left: 18px; border-left: 1px solid var(--rule); height: 16px; }
.rs-utility-social a { display: block; color: var(--ink-2); line-height: 0; }
.rs-utility-social a:hover { color: var(--gold); }
.rs-utility-social a { width: 14px; height: 13px; display: flex; align-items: center; justify-content: center; }
.rs-utility-social svg { height: 13px; width: auto; max-width: 14px; fill: currentColor; display: block; }
.rs-utility-actions { display: flex; align-items: center; gap: 20px; }
.rs-utility-actions .gh-icon-btn svg { width: 18px; height: 18px; }
.rs-utility-actions .rs-btn-solid { font-size: 1rem; padding: 8px 14px; letter-spacing: 0.12em; }
.rs-utility-actions .gh-icon-btn { color: var(--ink-2); }
.rs-utility-link {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
    text-decoration: none;
}
.rs-utility-link:hover { color: var(--ink); }
.rs-btn-solid {
    display: inline-block;
    background: var(--bronze);
    color: #FBF8F2;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 10px 16px;
    border-radius: 2px;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.15s ease;
}
.rs-btn-solid:hover { background: var(--ink); color: #FBF8F2; }
.rs-btn-solid-lg { font-size: 1.2rem; padding: 14px 24px; }

/* Header and navigation
/* ---------------------------------------------------------- */

.gh-head {
    height: auto;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    font-size: 1.3rem;
    color: var(--ink);
}
.home-template .gh-head { border-top: 1px solid var(--rule); }
.gh-head-inner { height: 70px; column-gap: 28px; }
.home-template .gh-head-inner { height: 50px; }

.gh-head-logo img {
    display: block;
    height: 30px;
    width: auto;
    max-height: none;
}
.gh-head-brand { height: auto; }

.gh-head-menu { margin-top: 0; font-weight: 500; }
.gh-head-menu .nav { gap: 30px; }
.gh-head-menu .nav a {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 500;
    letter-spacing: 0.005em;
    text-transform: none;
    color: var(--ink);
    line-height: 1.4;
    padding: 2px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.home-template .gh-head-menu .nav a {
    font-variant-caps: small-caps;
    font-size: 2rem;
    letter-spacing: 0.08em;
    line-height: 1;
    padding: 4px 0;
}
.gh-head-menu .nav a:hover { color: var(--ink); opacity: 1; border-bottom-color: var(--gold); }
.gh-head-menu .nav-more-toggle { color: var(--ink-2); }
.gh-dropdown { background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; box-shadow: 0 12px 30px -12px rgba(28, 26, 23, 0.25); }

.gh-head-actions { color: var(--ink-2); white-space: nowrap; }
.gh-head-members { flex-wrap: nowrap; }
.gh-head-link, .gh-head-button { white-space: nowrap; }
.gh-head-actions .gh-icon-btn { color: var(--ink-2); }
.gh-head-link {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
}
.gh-head-link:hover { color: var(--ink); }
.gh-head-button {
    background: var(--bronze);
    color: #FBF8F2;
    border: 0;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 10px 16px;
    border-radius: 2px;
    line-height: 1;
    transition: background 0.15s ease;
}
.gh-head-button:hover { background: var(--ink); color: #FBF8F2; opacity: 1; }

@media (min-width: 992px) {
    .home-template .gh-head-inner { grid-template-columns: 1fr; }
    .home-template .gh-head-brand { display: none; }
    .home-template .gh-head-actions { display: none; }
    .home-template .gh-head-menu { grid-column: 1; justify-content: center; margin: 0; padding: 0; }
    /* Casper shifts the home menu 40px left (.is-head-left-logo.home-template ...); same specificity to cancel it */
    .is-head-left-logo.home-template .gh-head:not(.is-header-hidden) .gh-head-menu { margin-left: 0; }
    .home-template .gh-head-menu .nav { gap: 44px; }
    .is-head-left-logo:not(.home-template) .gh-head-menu { margin-left: 4px; margin-right: 16px; }
    .is-head-left-logo:not(.home-template) .gh-head-menu .nav { gap: 22px; }
    .is-head-left-logo:not(.home-template) .gh-head-menu .nav a { font-size: 1.7rem; }
    .is-head-left-logo:not(.home-template) .gh-head-inner { column-gap: 22px; }
}

/* Hero (home)
/* ---------------------------------------------------------- */

.rs-hero { margin-top: max(4vmin, 28px); }
.rs-hero-img { display: block; background: var(--paper-2); }
.rs-hero-img img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 8.5;
    object-fit: cover;
}
.rs-hero-body {
    max-width: 860px;
    margin: 36px auto 0;
    text-align: center;
}
.rs-hero-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(3.8rem, 5.4vw, 6.2rem);
    line-height: 1.06;
    letter-spacing: -0.02em;
    margin: 14px 0 0;
}
.rs-hero-title a { color: var(--ink); text-decoration: none; }
.rs-hero-title a:hover { color: var(--gold); }
.rs-hero-excerpt {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    line-height: 1.5;
    color: var(--ink-2);
    margin: 20px auto 0;
    max-width: 720px;
}

/* Sections, grids and cards
/* ---------------------------------------------------------- */

.rs-section {
    margin-top: max(8vmin, 64px);
}
.rs-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
}
.rs-section-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 3.4rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
    color: var(--ink);
}
.rs-section-link {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    white-space: nowrap;
}
.rs-section-link:hover { border-bottom-color: var(--gold); }
.rs-section-sub {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    line-height: 1.5;
    color: var(--muted);
    margin: 8px 0 0;
}

.rs-grid {
    display: grid;
    gap: 44px 32px;
    margin-top: 32px;
}
.rs-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rs-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rs-grid .post-card { grid-column: auto; min-height: 0; }

.rs-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.rs-card-img {
    display: block;
    overflow: hidden;
    background: var(--paper-2);
}
.rs-card-img img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.rs-card:hover .rs-card-img img { transform: scale(1.03); }
.rs-card-body { padding-top: 16px; }
.rs-card-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 2.5rem;
    line-height: 1.18;
    letter-spacing: -0.015em;
    margin: 8px 0 0;
}
.rs-card-title a { color: var(--ink); text-decoration: none; }
.rs-card-title a:hover { color: var(--gold); }
.rs-card-excerpt {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    line-height: 1.5;
    color: var(--ink-2);
    margin: 10px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* The Collection strip: image and title only */
.rs-grid-4 .rs-card-img img { aspect-ratio: 4 / 3; }
.rs-grid-4 .rs-eyebrow,
.rs-grid-4 .rs-card-excerpt,
.rs-grid-4 .rs-card-meta { display: none; }
.rs-grid-4 .rs-card-title { font-size: 2.15rem; margin-top: 0; }
.rs-grid-4 .rs-card-body { padding-top: 14px; }

/* Home strips: a pool of twelve, four shown (the inline script in default.hbs shuffles them) */
.rs-strip .rs-grid-4 > .rs-card:nth-child(n+5) { display: none; }

/* The Collection section page: gallery-led (body class, not the card's own post_class) */
.tag-template.tag-the-collection .rs-card-img img { aspect-ratio: 4 / 3; }
.tag-template.tag-the-collection .rs-eyebrow,
.tag-template.tag-the-collection .rs-card-meta { display: none; }
.tag-template.tag-the-collection .rs-card-title { margin-top: 0; }

/* Join the Society: one horizontal layer, mark and title | teaser | button
/* ---------------------------------------------------------- */

.rs-join {
    margin-top: max(7vmin, 56px);
    padding: 34px 44px;
    background: var(--paper-2);
    border: 1px solid var(--rule);
}
.rs-join-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 44px;
    align-items: center;
}
.rs-join-head { display: flex; align-items: center; gap: 16px; }
.rs-join-mark { display: block; width: 40px; height: 40px; flex: none; }
.rs-join-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 3.3rem;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
    white-space: nowrap;
}
.rs-join-sub {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    line-height: 1.5;
    color: var(--ink-2);
    margin: 0;
    padding-left: 44px;
    border-left: 1px solid var(--rule);
}
.rs-join-cta { text-align: center; display: inline-flex; flex-direction: column; align-items: center; justify-self: end; }
.rs-join-note {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    color: var(--muted);
    margin: 10px 0 0;
}
.rs-join-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Article
/* ---------------------------------------------------------- */

.rs-article { padding-top: max(6vmin, 40px); }
.page-template .rs-article { padding-top: max(6vmin, 40px); }
.rs-article-header { text-align: center; padding-bottom: 0; }
.rs-article-header .rs-eyebrow { font-size: 1.2rem; }
.article-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(3.8rem, 5.6vw, 6.2rem);
    line-height: 1.06;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 14px auto 0;
    max-width: 880px;
}
.article-excerpt {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    line-height: 1.5;
    color: var(--ink-2);
    margin: 20px auto 0;
    max-width: 720px;
}
.rs-byline {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 24px 0 0;
}
.rs-byline a { color: var(--ink); text-decoration: none; }
.rs-byline a:hover { color: var(--gold); }
.gh-canvas .article-image {
    grid-column: wide-start / wide-end;
    margin: max(5vmin, 36px) 0 0;
}
.gh-canvas .article-image img { background: var(--paper-2); }
figcaption {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    color: var(--muted);
    margin-top: 10px;
    text-align: center;
}

.gh-content { margin-top: max(5vmin, 36px); }
.gh-content > blockquote:not([class]),
.gh-content > ol,
.gh-content > ul,
.gh-content > dl,
.gh-content > p {
    font-family: var(--font-serif);
    font-size: 2.15rem;
    line-height: 1.65;
    color: var(--ink);
}
.gh-content > [id] {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.gh-content > h2 { font-size: 3.3rem; line-height: 1.15; letter-spacing: -0.02em; }
.gh-content > h3 { font-size: 2.6rem; line-height: 1.2; }
.gh-content a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.gh-content a:hover { color: var(--gold); }
.gh-content > blockquote:not([class]) {
    border-left: 2px solid var(--gold);
    padding-left: 24px;
    color: var(--ink-2);
}
.gh-content > hr { border-top: 1px solid var(--rule); }
.post-template .gh-content > p:first-child::first-letter {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 4.4em;
    line-height: 0.78;
    float: left;
    margin: 0.1em 0.14em 0 0;
    color: var(--gold);
}

/* Section footnotes carried over from the old theme */
body.tag-dog-friendly-city-guides .gh-content > p:last-child {
    font-size: 1.4rem;
    line-height: 1.55;
    color: var(--muted);
    margin-top: 2.4rem;
}
body.tag-canine-health .gh-content h3 { font-size: 1.8rem; color: var(--muted); margin-top: 2.6rem; }
body.tag-canine-health .gh-content > p:last-child {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--muted);
    margin-top: 2rem;
}

/* Kali card */
/* Kali card at the foot of every article. Laid out like the Kali band on rochdog.com:
   picture left, three balanced lines in the middle, the pink button on the right. */
.gh-canvas > .kc { grid-column: wide-start / wide-end; width: 100%; max-width: 1100px; justify-self: center; }
.kc {
    background: var(--paper-2);
    border: 1px solid var(--rule);
    border-radius: 16px;
    font-family: var(--font-sans);
    margin-top: max(5vmin, 40px);
    padding: 30px 44px;
    gap: 36px;
    align-items: center;
}
.kc .face { height: 136px; }
.kc-body { flex: 1 1 auto; }
.kc-eyebrow { font-family: var(--font-sans); font-size: 1.25rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold, #A08010); margin: 0 0 6px; }
.kc-title { font-family: var(--font-display); font-weight: 500; font-size: 2.6rem; line-height: 1.15; color: var(--ink); letter-spacing: -0.01em; margin: 0 0 8px; text-wrap: balance; }
.kc-sub { font-family: var(--font-sans); font-size: 1.55rem; line-height: 1.55; color: var(--ink-2); margin: 0; text-wrap: balance; }
.kc-cta { flex: 0 0 auto; }
.kc-btn { font-family: var(--font-sans); border-radius: 12px; }
.kc-btn-kali { background: #D03878; padding: 15px 26px; font-size: 1.5rem; gap: 9px; }
.kc-btn-kali svg { width: 18px; height: 18px; }
.kc-btn-kali:hover { background: #C93372; }
@media (max-width: 860px) {
    .kc { flex-direction: column; text-align: center; padding: 28px 24px; gap: 18px; }
    .kc-cta, .kc-btn-kali { width: 100%; }
}

.article-comments { margin-top: max(5vmin, 40px); }

.rs-more { padding-top: max(6vmin, 48px); }
.rs-more .rs-section-head { padding-top: max(4vmin, 32px); }

/* Static pages: the dog head mark above the title */
.rs-page-header { padding-top: max(2vmin, 12px); }
.rs-page-mark { display: block; width: 64px; height: 64px; margin: 0 auto; }
.rs-page-header .article-title { margin-top: 24px; }
.rs-page-header .article-excerpt { margin-top: 18px; }
.rs-page-header::after {
    content: "";
    display: block;
    width: 48px;
    height: 1px;
    background: var(--gold);
    margin: 28px auto 0;
    grid-column: main-start / main-end;
}

/* Join the Society page (/join/, page-join.hbs)
/* ---------------------------------------------------------- */

/* Join page top: the case for joining on the left, the form in a card on the right */
.rs-joinhead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 96px;
    align-items: center;
    margin-top: max(7vmin, 56px);
}
.rs-joinhead-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(4rem, 5.4vw, 6rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 10px 0 0;
}
.rs-joinhead-lead {
    font-family: var(--font-serif);
    font-size: 2.1rem;
    line-height: 1.5;
    color: var(--ink);
    margin: 22px 0 0;
    max-width: 600px;
}
.rs-joinhead-sub {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    line-height: 1.55;
    color: var(--ink-2);
    margin: 16px 0 0;
    max-width: 600px;
}
.rs-joinhead-card {
    background: var(--paper-2);
    border: 1px solid var(--rule);
    padding: 28px 30px 26px;
    max-width: 400px;
    justify-self: end;
    width: 100%;
}
.rs-joinhead-cardtitle {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 6px 0 0;
}
.rs-joinhead-card .rs-signup { margin-top: 18px; max-width: none; }
.rs-signup-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
    margin: 14px 0 6px;
}
.rs-signup-label:first-child { margin-top: 0; }
.rs-joinhead-card .rs-signup-input { display: block; width: 100%; height: 42px; font-size: 1.35rem; }
.rs-joinhead-card .rs-signup .rs-btn-solid-lg { width: 100%; justify-content: center; margin-top: 18px; height: 42px; font-size: 1.1rem; }
.rs-joinhead-card .rs-join-note { margin-top: 14px; text-align: center; font-size: 1.15rem; }
.rs-joinhead-card .rs-signup.success .rs-signup-label,
.rs-joinhead-card .rs-signup.success .rs-signup-input,
.rs-joinhead-card .rs-signup.success .rs-btn-solid-lg { display: none; }
.rs-joinhead-lead, .rs-joinhead-sub, .rs-joinhead-title { text-wrap: balance; }
@media (max-width: 900px) {
    .rs-joinhead { grid-template-columns: 1fr; gap: 36px; }
    .rs-joinhead-card { justify-self: start; max-width: 440px; }
}


.rs-joinpage-head { max-width: 720px; }
.rs-joinpage-head .rs-page-title { margin-top: 10px; }
.rs-joinpage-head .rs-page-mark { margin-bottom: 20px; }
.rs-joinpage-cta { margin: 28px 0 0; }
.rs-joinpage-head .rs-join-note { margin-top: 14px; }
.rs-signup { margin: 30px auto 0; max-width: 640px; }
.rs-signup-row { display: flex; gap: 10px; }
.rs-signup-input {
    flex: 1 1 0;
    min-width: 0;
    font-family: var(--font-sans);
    font-size: 1.45rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 0 16px;
    height: 48px;
    outline: none;
}
.rs-signup-input:focus { border-color: var(--gold); }
.rs-signup-input::placeholder { color: var(--muted); }
.rs-signup .rs-btn-solid-lg { height: 48px; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; border: 0; cursor: pointer; }
.rs-signup.loading .rs-btn-solid-lg { opacity: 0.6; pointer-events: none; }
.rs-signup-msg { display: none; font-family: var(--font-sans); font-size: 1.35rem; margin: 14px 0 0; color: var(--ink-2); }
.rs-signup.success .rs-signup-row { display: none; }
.rs-signup.success .rs-signup-ok { display: block; }
.rs-signup.error .rs-signup-err { display: block; color: #8A2E2E; }

.rs-joinpage-h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.8rem, 3.4vw, 3.6rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 10px 0 0;
}
/* Kali AI section on the Join page: hero, six-cell capability grid, metrics strip. One content width, one spacing scale. */
.rs-kali {
    --kali-pad: clamp(28px, 4vw, 56px);
    margin-top: max(8vmin, 64px);
    padding: var(--kali-pad);
    background: var(--paper-2);
    border: 1px solid var(--rule);
    isolation: isolate;
}
.rs-kali-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 48px;
    align-items: center;
}
.rs-kali-copy { max-width: 620px; }
.rs-kali-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(3rem, 3.6vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 10px 0 0;
}
.rs-kali-lead {
    font-family: var(--font-serif);
    font-size: 1.85rem;
    line-height: 1.55;
    color: var(--ink-2);
    margin: 16px 0 0;
    max-width: 540px;
}
.rs-kali-face {
    display: block;
    width: 180px;
    height: auto;
    justify-self: end;
    margin-right: clamp(16px, 4vw, 56px);
}
.rs-kali-grid {
    list-style: none;
    margin: var(--kali-pad) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
}
.rs-kali-grid li {
    margin: 0;
    padding: 24px 24px 26px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.rs-kali-grid svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--gold);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.rs-kali-grid h3 {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 16px 0 0;
}
.rs-kali-grid p {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    line-height: 1.45;
    color: var(--ink-2);
    margin: 8px 0 0;
    max-width: 300px;
}
.rs-kali-stats {
    list-style: none;
    margin: var(--kali-pad) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.rs-kali-stats li {
    margin: 0;
    text-align: center;
    padding: 4px 12px;
    border-left: 1px solid var(--rule);
}
.rs-kali-stats li:first-child { border-left: 0; }
.rs-kali-stats strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 3.2rem;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.rs-kali-stats span {
    display: block;
    margin: 8px auto 0;
    max-width: 150px;
    font-family: var(--font-sans);
    font-size: 1.15rem;
    line-height: 1.35;
    letter-spacing: 0.03em;
    color: var(--muted);
}
@media (max-width: 900px) {
    .rs-kali-hero { grid-template-columns: 1fr; gap: 24px; }
    .rs-kali-face { justify-self: start; width: 140px; order: -1; }
    .rs-kali-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rs-kali-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 24px; }
    .rs-kali-stats li:nth-child(4) { border-left: 0; }
}
@media (max-width: 560px) {
    .rs-kali-grid { grid-template-columns: 1fr; }
    .rs-kali-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rs-kali-stats li:nth-child(3), .rs-kali-stats li:nth-child(5) { border-left: 0; }
    .rs-kali-stats li:nth-child(4) { border-left: 1px solid var(--rule); }
    .rs-kali-stats strong { font-size: 2.8rem; }
}

.rs-joinpage-perks {
    margin-top: max(8vmin, 64px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}
.rs-joinpage-perk { border-top: 1px solid var(--gold); padding-top: 18px; }
.rs-joinpage-perk h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 2.4rem;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0;
}
.rs-joinpage-perk p {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    line-height: 1.55;
    color: var(--ink-2);
    margin: 10px 0 0;
}
.rs-joinpage-close {
    margin-top: max(8vmin, 64px);
    text-align: center;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.rs-joinpage-close p {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    line-height: 1.5;
    color: var(--ink-2);
    margin: 14px 0 0;
}

/* Section and author pages
/* ---------------------------------------------------------- */

.rs-page-head {
    text-align: center;
    max-width: 760px;
    margin: max(6vmin, 44px) auto 0;
}
.rs-page-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(3.8rem, 5.4vw, 5.8rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    margin: 8px 0 0;
    color: var(--ink);
}
.rs-page-sub {
    font-family: var(--font-serif);
    font-size: 2.1rem;
    line-height: 1.5;
    color: var(--ink-2);
    margin: 18px auto 0;
    max-width: 640px;
}
.tag-template .rs-grid,
.author-template .rs-grid,
.paged .rs-grid { margin-top: max(5vmin, 40px); }
.paged:not(.tag-template):not(.author-template) .rs-grid { margin-top: max(6vmin, 44px); }

.pagination a {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-2);
}
.pagination .page-number { font-family: var(--font-sans); font-size: 1.2rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* Footer
/* ---------------------------------------------------------- */

.rs-site-footer {
    margin-top: max(8vmin, 64px);
    padding: max(6vmin, 56px) max(4vmin, 20px) 40px;
    background: var(--dark);
    color: #A39C91;
    font-family: var(--font-sans);
    font-size: 1.3rem;
    line-height: 1.6;
}
.rs-footer-grid {
    display: grid;
    grid-template-columns: 2fr auto auto auto;
    gap: 48px 64px;
    align-items: start;
}
.rs-footer-logo { display: inline-block; }
.rs-footer-logo img { width: 220px; height: auto; display: block; }
.rs-footer-line {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #E9E4DA;
    margin: 16px 0 0;
}
.rs-footer-desc {
    max-width: 400px;
    margin: 12px 0 0;
    font-family: var(--font-serif);
    font-size: 1.65rem;
    line-height: 1.6;
    color: #A39C91;
}
.rs-site-footer h4 {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 14px;
}
.rs-site-footer a { color: #D8D1C4; text-decoration: none; }
.rs-site-footer a:hover { color: var(--gold-2); }
.rs-footer-desc a { color: var(--gold-2); }
.rs-site-footer ul { list-style: none; margin: 0; padding: 0; }
.rs-site-footer li { padding: 4px 0; font-size: 1.4rem; }
.rs-footer-bottom {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid #2A2824;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 32px;
    font-size: 1.2rem;
    color: #7E776C;
}
.rs-footer-bottom a { color: #A39C91; }

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

@media (max-width: 1000px) {
    .rs-joinpage-perks { grid-template-columns: 1fr; gap: 28px; }
    .rs-join-inner { grid-template-columns: 1fr; gap: 22px; text-align: center; }
    .rs-join-head { justify-content: center; }
    .rs-join-sub { padding-left: 0; border-left: 0; }
    .rs-join-cta { text-align: center; }
    .rs-grid-3, .rs-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rs-footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 36px 32px; }
    .rs-brand-col { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
    .rs-signup-row { flex-direction: column; }
    .rs-signup .rs-btn-solid-lg { justify-content: center; }
    .rs-utility { display: none; }
    .home-template .gh-head-brand { display: flex; }
    .gh-head-inner { height: 60px; }
    .gh-head-logo img { height: 26px; }
    .gh-head-open .gh-head { background: var(--paper); }
    .gh-head-menu .nav a { font-size: 2.9rem; letter-spacing: 0; }
    .gh-head-open .gh-head-actions { background: var(--paper); }
    .gh-head-open .gh-head-button { border-radius: 0; }
    .rs-nameplate { padding-top: 18px; padding-bottom: 14px; }
    .rs-nameplate-logo img { width: min(260px, 64vw); }
    .rs-nameplate-line { font-size: 1.5rem; margin-top: 4px; }
    .rs-nameplate-sub { font-size: 0.85rem; letter-spacing: 0.12em; margin-top: 8px; padding: 0 16px; gap: 10px; }
    .rs-nameplate-sub::before, .rs-nameplate-sub::after { width: 16px; flex: none; }
    .home-template .gh-head-inner { height: 52px; }
    .rs-hero-body { margin-top: 24px; }
    .rs-hero-excerpt { font-size: 1.7rem; }
    .rs-section-title { font-size: 2.5rem; }
    .rs-join { padding: 36px 20px; }
    .rs-join-title { font-size: 2.6rem; white-space: normal; }
    .rs-join-sub { font-size: 1.7rem; }
    .article-excerpt { font-size: 1.7rem; }
    .gh-content > blockquote:not([class]),
    .gh-content > ol,
    .gh-content > ul,
    .gh-content > dl,
    .gh-content > p { font-size: 1.95rem; }
}

@media (max-width: 600px) {
    .rs-grid-3, .rs-grid-4 { grid-template-columns: 1fr; gap: 36px; }
    .rs-footer-grid { grid-template-columns: 1fr 1fr; }
    .rs-footer-bottom { flex-direction: column; align-items: center; text-align: center; }
    .rs-section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}
