/* ==========================================================================
   StitchFlow GH — Fashion Hub
   Editorial public pages: feed, article, topic, trend tracker.
   Palette matches the Showroom (navy, cream) with the StitchFlow violet.
   ========================================================================== */

:root {
    /* Public pages are light-only; a dark device setting must not flip them. */
    color-scheme: light;
    color-scheme: only light;
    --hub-navy: #1b2438;
    --hub-navy-deep: #131a2a;
    --hub-ink: #232a3a;
    --hub-muted: #6a7285;
    --hub-line: #e4e1d8;
    --hub-line-strong: #d3cec0;
    --hub-cream: #f7f4ec;
    --hub-paper: #fffdf8;
    --hub-gold: #5b4bc4;
    --hub-gold-deep: #3d2f9c;
    --hub-gold-soft: #ece8ff;
    --hub-gold-on-dark: #b3a9ff;
    --hub-violet: #5b4bc4;
    --hub-violet-deep: #3d2f9c;
    --hub-violet-soft: #ece8ff;
    --hub-green: #2f7a58;
    --hub-green-soft: #e2f2e9;
    --hub-red: #b1442f;
    --hub-red-soft: #fbe7e2;
    --hub-radius: 16px;
    --hub-radius-sm: 10px;
    --hub-shadow: 0 18px 46px rgba(27, 36, 56, .09);
    --hub-shadow-sm: 0 6px 18px rgba(27, 36, 56, .07);
    --hub-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --hub-sans: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --hub-wrap: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--hub-cream);
    color: var(--hub-ink);
    font-family: var(--hub-sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--hub-serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.15; color: var(--hub-navy); }
p { margin: 0; }

.hub-wrap { width: 100%; max-width: var(--hub-wrap); margin: 0 auto; padding: 0 22px; }
.hub-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; }
.hub-muted { color: var(--hub-muted); }
.hub-small { font-size: 13px; }
.hub-hide-xs { display: inline; }
.hub-show-xs { display: none; }
.hub-inline-form { display: inline-flex; margin: 0; }
.hub-dot { opacity: .45; }

/* ---------------------------------------------------------------- Buttons */
.hub-btn-primary,
.hub-btn-outline,
.hub-action,
.hub-follow-btn,
.hub-follow-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 11px 20px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .01em;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.hub-btn-primary { background: var(--hub-navy); color: #fff; box-shadow: var(--hub-shadow-sm); }
.hub-btn-primary:hover { background: var(--hub-navy-deep); transform: translateY(-1px); }
.hub-btn-outline { background: transparent; color: var(--hub-navy); border-color: var(--hub-line-strong); }
.hub-btn-outline:hover { border-color: var(--hub-navy); background: #fff; }
.hub-btn-block { width: 100%; margin-top: 10px; }
.hub-btn-sm { padding: 8px 15px; font-size: 12.5px; }
.hub-btn-primary.is-following,
.hub-follow-btn.is-following,
.hub-follow-mini.is-following { background: var(--hub-green-soft); color: var(--hub-green); border-color: transparent; box-shadow: none; }

/* ---------------------------------------------------------------- Topbar */
.hub-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(27, 36, 56, .97);
    color: #f4f1e8;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.hub-topbar-inner { display: flex; align-items: center; gap: 26px; min-height: 66px; }
.hub-brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hub-brand-mark {
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--hub-violet);
    color: #fff;
}
.hub-brand-mark svg { width: 20px; height: 20px; }
.hub-brand-text { font-weight: 800; font-size: 14px; letter-spacing: .16em; white-space: nowrap; }
.hub-brand-text em { font-style: normal; color: var(--hub-gold-on-dark); }

.hub-top-links { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.hub-top-links a {
    position: relative;
    font-size: 13px;
    font-weight: 600;
    color: rgba(244, 241, 232, .78);
    padding: 6px 0;
    transition: color .15s ease;
}
.hub-top-links a:hover { color: #fff; }
.hub-top-links a.active { color: var(--hub-gold-on-dark); }
.hub-top-links a.active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    border-radius: 2px; background: var(--hub-gold-on-dark);
}
.hub-top-actions { display: flex; align-items: center; gap: 10px; }
.hub-icon-btn {
    display: grid; place-items: center; width: 36px; height: 36px;
    border-radius: 10px; color: rgba(244, 241, 232, .82);
    background: rgba(255, 255, 255, .06);
    transition: background .15s ease, color .15s ease;
}
.hub-icon-btn:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.hub-menu-btn { display: none; background: none; border: 0; color: #f4f1e8; padding: 4px; cursor: pointer; }
.hub-top-actions .hub-btn-outline { color: #f4f1e8; border-color: rgba(255, 255, 255, .28); padding: 9px 16px; }
.hub-top-actions .hub-btn-outline:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); }
.hub-top-actions .hub-btn-primary { background: var(--hub-gold); color: #fff; padding: 9px 18px; }
.hub-top-actions .hub-btn-primary:hover { background: var(--hub-violet-deep); }
.hub-top-actions .hub-btn-studio { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------------------------------------------------------------- Mobile menu */
.hub-mobile-menu { position: fixed; inset: 0; z-index: 80; background: rgba(13, 18, 32, .55); backdrop-filter: blur(3px); }
.hub-mobile-sheet {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: var(--hub-paper);
    border-radius: 22px 22px 0 0;
    padding: 10px 22px 30px;
    box-shadow: 0 -20px 60px rgba(13, 18, 32, .35);
    max-height: 86vh; overflow-y: auto;
}
.hub-sheet-handle { width: 44px; height: 4px; border-radius: 4px; background: var(--hub-line-strong); margin: 6px auto 14px; }
.hub-m-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; font-weight: 600; color: var(--hub-navy); border-bottom: 1px solid var(--hub-line); }
.hub-m-item:last-child { border-bottom: 0; }
.hub-m-divider { height: 1px; background: var(--hub-line); margin: 8px 0; }
.hub-m-signin { color: var(--hub-muted); }
.hub-m-join { color: var(--hub-gold-deep); }

/* ---------------------------------------------------------------- Story alerts */
.hub-alert-bar {
    background: linear-gradient(90deg, #f0ebff 0%, #fbf6e8 100%);
    border-bottom: 1px solid #e0d8f6;
}
.hub-alert-bar[hidden] { display: none; }
.hub-alert-inner { display: flex; align-items: center; gap: 13px; padding: 10px 0; }
.hub-alert-ic {
    display: grid; place-items: center; flex-shrink: 0;
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--hub-violet); color: #fff;
}
.hub-alert-ic svg { width: 18px; height: 18px; }
.hub-alert-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hub-alert-copy strong { font-family: var(--hub-sans); font-size: 12.5px; font-weight: 800; color: var(--hub-navy); }
.hub-alert-copy span { font-size: 11.5px; line-height: 1.45; color: var(--hub-muted); }
.hub-alert-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.hub-alert-enable {
    border: 0; border-radius: 999px; cursor: pointer;
    background: var(--hub-violet); color: #fff;
    padding: 9px 16px; font-size: 12.5px; font-weight: 800;
    transition: background .15s ease;
}
.hub-alert-enable:hover { background: var(--hub-violet-deep); }
.hub-alert-enable[disabled] { opacity: .7; cursor: wait; }
.hub-alert-later {
    border: 0; background: none; cursor: pointer;
    padding: 9px 6px; font-size: 12px; font-weight: 700; color: var(--hub-muted);
}
.hub-alert-later:hover { color: var(--hub-navy); }
.hub-alert-bar[data-state="blocked"] .hub-alert-enable,
.hub-alert-bar[data-state="ios"] .hub-alert-enable,
.hub-alert-bar[data-state="error"] .hub-alert-enable { display: none; }

@media (max-width: 640px) {
    .hub-alert-inner { flex-wrap: wrap; gap: 10px; padding: 12px 0; }
    .hub-alert-copy { flex: 1 1 200px; }
    .hub-alert-actions { width: 100%; margin-left: 0; }
    .hub-alert-enable { flex: 1; padding: 10px 14px; }
}

/* ---------------------------------------------------------------- Hero */
.hub-hero {
    position: relative;
    background:
        radial-gradient(1100px 420px at 82% -10%, rgba(201, 150, 47, .18), transparent 62%),
        radial-gradient(900px 420px at 6% 110%, rgba(91, 75, 196, .14), transparent 60%),
        var(--hub-navy);
    color: #f6f2e8;
    overflow: hidden;
}
.hub-hero::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
    opacity: .5;
}
.hub-hero-inner {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, .8fr);
    gap: 44px; align-items: end;
    padding-top: 58px; padding-bottom: 52px;
}
.hub-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: var(--hub-gold);
}
.hub-hero .hub-eyebrow,
.hub-topic-hero .hub-eyebrow,
.hub-trends-hero .hub-eyebrow { color: var(--hub-gold-on-dark); }
.hub-spark { font-size: 14px; }
.hub-hero h1 { margin: 14px 0 14px; font-size: clamp(34px, 5vw, 56px); color: #fdfaf2; font-weight: 500; }
.hub-hero h1 em { font-style: italic; color: var(--hub-gold-on-dark); }
.hub-hero-copy > p { max-width: 560px; color: rgba(246, 242, 232, .78); font-size: 15.5px; }

.hub-search {
    position: relative;
    display: flex; align-items: center;
    margin-top: 24px; max-width: 620px;
    background: #fff; border-radius: 999px; padding: 5px 5px 5px 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
}
.hub-search-ic { display: grid; place-items: center; color: var(--hub-muted); }
.hub-search input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: none;
    padding: 11px 12px; font: inherit; color: var(--hub-navy); font-size: 14.5px;
}
.hub-search input::placeholder { color: #98a0b0; }
.hub-search-go {
    border: 0; border-radius: 999px; padding: 11px 22px; cursor: pointer;
    background: var(--hub-navy); color: #fff; font-weight: 700; font-size: 13.5px;
    transition: background .15s ease;
}
.hub-search-go:hover { background: var(--hub-violet-deep); }
.hub-suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border-radius: 14px; padding: 6px;
    box-shadow: 0 24px 50px rgba(13, 18, 32, .25);
    max-height: 320px; overflow-y: auto; z-index: 20;
}
.hub-suggest a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: 10px; color: var(--hub-navy); }
.hub-suggest a:hover { background: var(--hub-cream); }
.hub-suggest a strong { font-size: 13.5px; font-weight: 600; }
.hub-suggest a em { font-style: normal; font-size: 11.5px; color: var(--hub-muted); white-space: nowrap; }

.hub-hero-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; }
.hub-hero-links a { font-size: 12.5px; font-weight: 600; color: rgba(246, 242, 232, .72); border-bottom: 1px solid rgba(246, 242, 232, .25); padding-bottom: 2px; }
.hub-hero-links a:hover { color: var(--hub-gold-on-dark); border-color: var(--hub-gold-on-dark); }

.hub-hero-stats { display: grid; gap: 14px; }
.hub-stat {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px; padding: 15px 18px;
    backdrop-filter: blur(4px);
}
.hub-stat strong { display: block; font-family: var(--hub-serif); font-size: 27px; font-weight: 600; color: #fff; line-height: 1.1; }
.hub-stat span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: rgba(246, 242, 232, .62); }

/* ---------------------------------------------------------------- Shell */
.hub-shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 38px; padding-top: 38px; padding-bottom: 64px; align-items: start; }
.hub-feed { min-width: 0; }
.hub-aside { display: grid; gap: 18px; position: sticky; top: 88px; }

.hub-section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.hub-section-head h2 { font-size: 24px; }
.hub-section-head > a { font-size: 12.5px; font-weight: 700; color: var(--hub-gold-deep); white-space: nowrap; }
.hub-section-head > a:hover { text-decoration: underline; }
.hub-feed-head { flex-wrap: wrap; margin-top: 34px; }

.hub-tabs { display: inline-flex; gap: 4px; background: #ece8dc; border-radius: 999px; padding: 4px; }
.hub-tab { padding: 7px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--hub-muted); }
.hub-tab.active { background: #fff; color: var(--hub-navy); box-shadow: 0 2px 6px rgba(27, 36, 56, .1); }
.hub-tab:hover { color: var(--hub-navy); }

/* ---------------------------------------------------------------- Featured */
.hub-featured { margin-bottom: 8px; }
.hub-featured-grid { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; }
.hub-feature {
    position: relative; display: block; overflow: hidden;
    border-radius: var(--hub-radius); min-height: 150px;
    background: linear-gradient(140deg, var(--hub-navy), #2c3752);
    color: #fff; isolation: isolate;
}
.hub-feature-lead { grid-row: span 2; min-height: 320px; }
.hub-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; z-index: -2; }
.hub-feature:hover img { transform: scale(1.04); }
.hub-feature-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13, 18, 32, .08) 20%, rgba(13, 18, 32, .82) 100%); }
.hub-feature .hub-badge { position: absolute; top: 12px; left: 12px; }
.hub-feature-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px 18px; display: grid; gap: 5px; }
.hub-feature-lead .hub-feature-body { padding: 22px 22px 24px; }
.hub-feature-body strong { font-family: var(--hub-serif); font-size: 17px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-feature-lead .hub-feature-body strong { font-size: 25px; }

/* ---------------------------------------------------------------- Filters */
.hub-filters { background: var(--hub-paper); border: 1px solid var(--hub-line); border-radius: var(--hub-radius); padding: 14px 16px; margin-bottom: 22px; }
.hub-filter-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.hub-filter-field { display: grid; gap: 5px; min-width: 0; }
.hub-filter-field > span { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hub-muted); }
.hub-filter-field select {
    width: 100%; appearance: none; border: 1px solid var(--hub-line); background: #fff;
    border-radius: 9px; padding: 8px 26px 8px 10px; font: inherit; font-size: 12.5px; color: var(--hub-navy);
    background-image: linear-gradient(45deg, transparent 50%, var(--hub-muted) 50%), linear-gradient(135deg, var(--hub-muted) 50%, transparent 50%);
    background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}
.hub-filter-field select:focus { outline: 2px solid var(--hub-violet-soft); border-color: var(--hub-violet); }
.hub-filter-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.hub-quick-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.hub-clear { font-size: 12px; font-weight: 700; color: var(--hub-red); }

.hub-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px;
    border: 1px solid var(--hub-line-strong);
    background: #fff; color: var(--hub-ink);
    font-size: 12px; font-weight: 600; line-height: 1.4;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.hub-chip:hover { border-color: var(--hub-navy); }
.hub-chip.on { background: var(--hub-navy); border-color: var(--hub-navy); color: #fff; }
.hub-chip-cloud { display: flex; flex-wrap: wrap; gap: 7px; }

/* ---------------------------------------------------------------- Post grid */
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hub-card {
    display: flex; flex-direction: column;
    background: var(--hub-paper); border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius); overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hub-card:hover { transform: translateY(-3px); box-shadow: var(--hub-shadow); border-color: var(--hub-line-strong); }
.hub-card-cover { position: relative; display: block; aspect-ratio: 16 / 10; background: linear-gradient(140deg, #2c3752, var(--hub-navy)); overflow: hidden; }
.hub-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.hub-card-cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .24em; color: rgba(255, 255, 255, .3); }
.hub-card-cover .hub-badge { position: absolute; top: 10px; left: 10px; }
.hub-card-cover .hub-badge-featured { left: auto; right: 10px; }
.hub-card-body { padding: 15px 16px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hub-card-title { font-size: 18.5px; line-height: 1.24; }
.hub-card-title a:hover { color: var(--hub-violet-deep); }
.hub-card-excerpt { font-size: 13px; color: var(--hub-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-card-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-card-topics .hub-chip { padding: 3px 9px; font-size: 10.5px; }
.hub-card-meta { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hub-line); font-size: 11.5px; color: var(--hub-muted); }
.hub-card-author { font-weight: 700; color: var(--hub-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.hub-save-btn {
    margin-left: auto; display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 9px;
    border: 1px solid var(--hub-line); background: #fff; color: var(--hub-muted);
    cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.hub-save-btn:hover { color: var(--hub-violet); border-color: var(--hub-violet); }
.hub-save-btn.is-saved { background: var(--hub-violet-soft); border-color: var(--hub-violet); color: var(--hub-violet-deep); }
.hub-save-btn.is-saved svg { fill: currentColor; }

/* ---------------------------------------------------------------- Badges */
.hub-badge {
    display: inline-flex; align-items: center;
    padding: 4px 9px; border-radius: 6px;
    font-size: 9.5px; font-weight: 800; letter-spacing: .12em; line-height: 1.2;
    background: rgba(255, 255, 255, .94); color: var(--hub-navy);
    box-shadow: 0 2px 6px rgba(13, 18, 32, .14);
    white-space: nowrap;
}
.hub-badge-news { background: #dbe9ff; color: #1c4a91; }
.hub-badge-quick_learn { background: var(--hub-green-soft); color: #1d6144; }
.hub-badge-guide { background: var(--hub-violet-soft); color: var(--hub-violet-deep); }
.hub-badge-trend { background: var(--hub-violet-soft); color: var(--hub-violet-deep); }
.hub-badge-qa { background: var(--hub-red-soft); color: #8f2f1e; }
.hub-badge-featured { background: var(--hub-gold); color: #fff; }
.hub-badge-pinned { background: var(--hub-navy); color: #fff; }
.hub-article-badges .hub-badge { position: static; box-shadow: none; }

/* ---------------------------------------------------------------- Pagination */
.hub-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }
.hub-page-btn { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--hub-line-strong); background: #fff; font-size: 12.5px; font-weight: 700; color: var(--hub-navy); }
.hub-page-btn:hover { border-color: var(--hub-navy); }
.hub-page-btn.disabled { opacity: .42; pointer-events: none; }
.hub-page-count { font-size: 12px; color: var(--hub-muted); }

/* ---------------------------------------------------------------- Empty */
.hub-empty { text-align: center; padding: 52px 22px; background: var(--hub-paper); border: 1px dashed var(--hub-line-strong); border-radius: var(--hub-radius); }
.hub-empty-mark { font-size: 30px; color: var(--hub-gold); margin-bottom: 6px; }
.hub-empty h3 { font-size: 21px; margin-bottom: 6px; }
.hub-empty p { color: var(--hub-muted); font-size: 13.5px; max-width: 420px; margin: 0 auto; }
.hub-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------------------------------------------------------------- Aside panels */
.hub-panel { background: var(--hub-paper); border: 1px solid var(--hub-line); border-radius: var(--hub-radius); padding: 18px; }
.hub-panel-quiet { background: #f2eee3; }
.hub-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hub-panel-head h3 { font-size: 16px; }
.hub-panel-head > a { font-size: 11.5px; font-weight: 700; color: var(--hub-gold-deep); }
.hub-panel-head-gap { margin-top: 18px; }
.hub-sticky { position: sticky; top: 88px; }
.hub-panel .hub-btn-block + .hub-btn-block { margin-top: 8px; }

.hub-topic-list { display: grid; }
.hub-topic-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hub-line); }
.hub-topic-row:last-child { border-bottom: 0; }
.hub-topic-row:hover .hub-topic-name { color: var(--hub-violet-deep); }
.hub-topic-kind { font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--hub-muted); min-width: 52px; }
.hub-topic-name { font-size: 13.5px; font-weight: 600; color: var(--hub-navy); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-topic-count { font-size: 11px; font-weight: 700; color: var(--hub-gold-deep); background: var(--hub-gold-soft); border-radius: 999px; padding: 2px 8px; }

.hub-your-links { display: grid; gap: 8px; }
.hub-your-links a { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: var(--hub-cream); border: 1px solid var(--hub-line); }
.hub-your-links a:hover { border-color: var(--hub-gold); }
.hub-your-links span { font-size: 13px; font-weight: 700; color: var(--hub-navy); }
.hub-your-links em { font-style: normal; font-size: 10.5px; color: var(--hub-muted); }
.hub-join-panel h3 { font-size: 19px; margin-bottom: 6px; }
.hub-join-panel p { font-size: 13px; color: var(--hub-muted); }

/* ---------------------------------------------------------------- Breadcrumb */
.hub-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; color: var(--hub-muted); margin-bottom: 16px; }
.hub-breadcrumb a { color: var(--hub-muted); }
.hub-breadcrumb a:hover { color: var(--hub-gold-deep); }

/* ---------------------------------------------------------------- Article */
.hub-progress { position: fixed; top: 66px; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--hub-gold-deep), var(--hub-gold)); z-index: 70; transition: width .1s linear; }
.hub-post-shell { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 42px; padding-top: 34px; padding-bottom: 70px; align-items: start; }
.hub-article { min-width: 0; background: var(--hub-paper); border: 1px solid var(--hub-line); border-radius: 20px; padding: 30px 38px 40px; }
.hub-article-head { margin-bottom: 24px; }
.hub-article-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hub-article-head h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.12; color: var(--hub-navy); font-weight: 500; }
.hub-article-dek { margin-top: 14px; font-size: 16.5px; line-height: 1.55; color: #4b5468; font-family: var(--hub-serif); font-weight: 400; }

.hub-article-byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hub-line); }
.hub-author-avatar {
    display: grid; place-items: center; flex-shrink: 0;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--hub-navy); color: #fff;
    font-size: 12px; font-weight: 800; letter-spacing: .04em; overflow: hidden;
}
.hub-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hub-author-avatar-lg { width: 58px; height: 58px; font-size: 15px; }
.hub-byline-copy { display: grid; gap: 1px; min-width: 0; }
.hub-byline-name { font-size: 13.5px; font-weight: 700; color: var(--hub-navy); }
.hub-byline-meta { font-size: 11.5px; color: var(--hub-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.hub-follow-btn { margin-left: auto; padding: 7px 16px; font-size: 12px; background: var(--hub-navy); color: #fff; }
.hub-follow-btn.is-following { background: var(--hub-green-soft); color: var(--hub-green); }
.hub-follow-mini { padding: 2px 8px; font-size: 10px; background: transparent; color: var(--hub-violet-deep); border: 1px solid var(--hub-line-strong); }
.hub-follow-mini.is-following { background: var(--hub-green-soft); color: var(--hub-green); border-color: transparent; }

.hub-article-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hub-action {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--hub-line-strong); background: #fff;
    color: var(--hub-navy); font-size: 12px; font-weight: 700; cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.hub-action:hover { border-color: var(--hub-navy); }
.hub-action.is-saved { background: var(--hub-violet-soft); border-color: var(--hub-violet); color: var(--hub-violet-deep); }
.hub-action.is-saved svg { fill: currentColor; }

.hub-collection-pop { margin-top: 10px; background: var(--hub-cream); border: 1px solid var(--hub-line); border-radius: 12px; padding: 14px; }
.hub-collection-pop label { display: block; font-size: 11.5px; font-weight: 700; color: var(--hub-muted); margin-bottom: 7px; }
.hub-collection-row { display: flex; gap: 8px; }
.hub-collection-row input { flex: 1; min-width: 0; border: 1px solid var(--hub-line-strong); border-radius: 9px; padding: 9px 12px; font: inherit; font-size: 13px; background: #fff; color: var(--hub-navy); }
.hub-collection-row input:focus { outline: 2px solid var(--hub-violet-soft); border-color: var(--hub-violet); }
.hub-collection-existing { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.hub-article-cover { margin: 26px -38px 0; overflow: hidden; border-radius: 0; }
.hub-article-cover img { width: 100%; max-height: 520px; object-fit: cover; }

.hub-prose { font-size: 16.5px; line-height: 1.78; color: #2f3648; overflow-wrap: break-word; }
.hub-prose > * + * { margin-top: 1.05em; }
.hub-prose h2 { font-size: 28px; margin-top: 1.5em; color: var(--hub-navy); }
.hub-prose h3 { font-size: 22px; margin-top: 1.4em; color: var(--hub-navy); }
.hub-prose h4 { font-size: 18px; margin-top: 1.3em; }
.hub-prose p { margin: 0; }
.hub-prose a { color: var(--hub-violet-deep); text-decoration: underline; text-underline-offset: 2px; }
.hub-prose a:hover { color: var(--hub-gold-deep); }
.hub-prose ul, .hub-prose ol { padding-left: 1.3em; }
.hub-prose li + li { margin-top: .4em; }
.hub-prose blockquote {
    margin: 1.5em 0; padding: 14px 20px; border-left: 3px solid var(--hub-gold);
    background: var(--hub-gold-soft); border-radius: 0 12px 12px 0;
    font-family: var(--hub-serif); font-size: 19px; color: var(--hub-navy);
}
.hub-prose img { border-radius: 12px; margin: 1.4em auto; }
.hub-prose code { background: #efece3; padding: 2px 6px; border-radius: 5px; font-size: .88em; }
.hub-prose pre { background: var(--hub-navy); color: #f6f2e8; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 13.5px; }
.hub-prose pre code { background: none; padding: 0; color: inherit; }
.hub-prose hr { border: 0; border-top: 1px solid var(--hub-line-strong); margin: 2em 0; }
.hub-prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hub-prose th, .hub-prose td { border: 1px solid var(--hub-line); padding: 9px 12px; text-align: left; }
.hub-prose th { background: var(--hub-cream); font-weight: 700; }

/* Reading mode: hide chrome, widen the prose. */
body.hub-reading .hub-topbar,
body.hub-reading .hub-footer,
body.hub-reading .hub-post-aside,
body.hub-reading .hub-shop,
body.hub-reading .hub-comments,
body.hub-reading .hub-article-topics,
body.hub-reading .hub-author-card,
body.hub-reading .hub-breadcrumb,
body.hub-reading .hub-article-actions,
body.hub-reading .hub-article-byline { display: none; }
body.hub-reading .hub-post-shell { display: block; max-width: 760px; }
body.hub-reading .hub-article { border: 0; background: transparent; padding: 40px 0; }
body.hub-reading .hub-prose { font-size: 19px; line-height: 1.85; }
body.hub-reading .hub-progress { top: 0; }

/* ---------------------------------------------------------------- Shop the look */
.hub-shop { margin: 34px 0 6px; padding: 22px; border-radius: var(--hub-radius); background: linear-gradient(160deg, #f1ecff, #f7f4ec 65%); border: 1px solid #ddd6f7; }
.hub-shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.hub-shop-head h2 { font-size: 22px; margin-top: 4px; }
.hub-shop-note { font-size: 11.5px; color: var(--hub-muted); }
.hub-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.hub-shop-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hub-line); border-radius: 13px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.hub-shop-card:hover { transform: translateY(-2px); box-shadow: var(--hub-shadow-sm); }
.hub-shop-cover { display: block; aspect-ratio: 3 / 4; background: linear-gradient(150deg, #2c3752, var(--hub-navy)); overflow: hidden; }
.hub-shop-cover img { width: 100%; height: 100%; object-fit: cover; }
.hub-shop-body { padding: 10px 12px 12px; display: grid; gap: 2px; }
.hub-shop-body strong { font-size: 13px; font-weight: 700; color: var(--hub-navy); line-height: 1.3; }
.hub-shop-body em { font-style: normal; font-size: 11px; color: var(--hub-muted); }
.hub-shop-meta { font-size: 11px; font-weight: 600; color: var(--hub-gold-deep); margin-top: 3px; }

/* ---------------------------------------------------------------- Topics under article */
.hub-article-topics { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--hub-line); display: grid; gap: 14px; }
.hub-topic-group { display: grid; gap: 8px; }
.hub-topic-group-label { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--hub-muted); }
.hub-topic-group .hub-chip-cloud { align-items: center; }

/* ---------------------------------------------------------------- Author card */
.hub-author-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 32px; padding: 20px 22px; background: var(--hub-cream); border: 1px solid var(--hub-line); border-radius: var(--hub-radius); }
.hub-author-card-main { display: flex; align-items: center; gap: 15px; }
.hub-author-card h3 { font-size: 20px; margin: 2px 0 3px; }
.hub-author-card p { font-size: 12.5px; color: var(--hub-muted); max-width: 380px; }
.hub-author-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- Comments */
.hub-comments { margin-top: 36px; }
.hub-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--hub-gold-soft); color: var(--hub-gold-deep); font-family: var(--hub-sans); font-size: 12px; font-weight: 800; vertical-align: middle; }
.hub-comment-form { background: var(--hub-cream); border: 1px solid var(--hub-line); border-radius: var(--hub-radius); padding: 14px; }
.hub-comment-form textarea,
.hub-reply textarea {
    width: 100%; border: 1px solid var(--hub-line-strong); border-radius: 10px;
    padding: 11px 13px; font: inherit; font-size: 13.5px; color: var(--hub-navy);
    background: #fff; resize: vertical; min-height: 76px;
}
.hub-comment-form input[type="text"],
.hub-reply input[type="text"] {
    width: 100%; border: 1px solid var(--hub-line-strong); border-radius: 10px;
    padding: 10px 13px; font: inherit; font-size: 13.5px; color: var(--hub-navy);
    background: #fff;
}
.hub-comment-form input[type="text"]:focus,
.hub-reply input[type="text"]:focus,
.hub-comment-form textarea:focus,
.hub-reply textarea:focus { outline: 2px solid var(--hub-violet-soft); border-color: var(--hub-violet); }
.hub-comment-name { margin-bottom: 8px; }
.hub-reply-name { margin-bottom: 8px; }
.hub-comment-note { margin-top: 8px; font-size: 11.5px; color: var(--hub-muted); }
.hub-form-error { margin-bottom: 12px; padding: 10px 13px; border-radius: 10px; background: #fdecec; border: 1px solid #f3c8c8; color: #8f2f1e; font-size: 12.5px; font-weight: 600; }
.hub-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hub-comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.hub-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--hub-muted); cursor: pointer; }
.hub-check input { accent-color: var(--hub-violet); }
.hub-comment-list { margin-top: 20px; display: grid; gap: 14px; }
.hub-comment { background: #fff; border: 1px solid var(--hub-line); border-radius: 13px; padding: 14px 16px; }
.hub-comment.is-question { border-left: 3px solid var(--hub-red); background: #fffaf8; }
.hub-comment-head { display: flex; align-items: center; gap: 10px; }
.hub-comment-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--hub-navy); color: #fff; font-size: 10.5px; font-weight: 800; flex-shrink: 0; }
.hub-comment-head strong { font-size: 12.5px; color: var(--hub-navy); display: block; }
.hub-comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 10.5px; color: var(--hub-muted); }
.hub-comment-body { margin-top: 8px; font-size: 13.5px; line-height: 1.6; color: #333b4d; white-space: pre-line; }
.hub-tag-soft { display: inline-flex; padding: 1px 7px; border-radius: 999px; background: var(--hub-red-soft); color: #8f2f1e; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; }
.hub-tag-gold { background: var(--hub-gold-soft); color: var(--hub-gold-deep); }
.hub-tag-visitor { background: #eef1f6; color: #4a5568; }
.hub-comment-reply { margin: 12px 0 0 22px; background: var(--hub-cream); border-color: var(--hub-line); }
.hub-comment-reply.is-answer { background: #f4f1ff; border-color: #ded8ff; }
.hub-reply { margin-top: 10px; }
.hub-reply summary { font-size: 11.5px; font-weight: 700; color: var(--hub-violet-deep); cursor: pointer; list-style: none; }
.hub-reply summary::-webkit-details-marker { display: none; }
.hub-reply[open] summary { margin-bottom: 8px; }
.hub-reply button { margin-top: 8px; }
.hub-comments-empty { font-size: 13px; }

/* ---------------------------------------------------------------- Post aside */
.hub-post-aside { display: grid; gap: 18px; align-items: start; }
.hub-mini-list { display: grid; gap: 10px; }
.hub-mini { display: flex; gap: 10px; align-items: center; }
.hub-mini img { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; flex-shrink: 0; background: var(--hub-cream); }
.hub-mini span { display: grid; gap: 1px; min-width: 0; }
.hub-mini em { font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--hub-gold-deep); }
.hub-mini strong { font-size: 12.5px; font-weight: 600; color: var(--hub-navy); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-mini:hover strong { color: var(--hub-violet-deep); }

/* ---------------------------------------------------------------- Topic page */
.hub-topic-hero { background: linear-gradient(160deg, var(--hub-navy), #2b3550); color: #f6f2e8; padding: 34px 0 38px; }
.hub-topic-hero .hub-breadcrumb { color: rgba(246, 242, 232, .6); }
.hub-topic-hero .hub-breadcrumb a { color: rgba(246, 242, 232, .7); }
.hub-topic-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hub-topic-hero h1 { font-size: clamp(30px, 4.5vw, 46px); color: #fdfaf2; margin: 8px 0 10px; }
.hub-topic-hero p { max-width: 600px; color: rgba(246, 242, 232, .74); }
.hub-topic-hero .hub-btn-primary { background: var(--hub-gold); color: #fff; }
.hub-topic-hero .hub-btn-primary.is-following { background: rgba(255, 255, 255, .14); color: #fff; }
.hub-topic-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 38px; padding-top: 32px; padding-bottom: 64px; align-items: start; }

/* ---------------------------------------------------------------- Trend tracker */
.hub-trends-hero { background: radial-gradient(900px 360px at 88% 0%, rgba(91, 75, 196, .26), transparent 60%), var(--hub-navy); color: #f6f2e8; padding: 30px 0 40px; }
.hub-trends-hero .hub-breadcrumb { color: rgba(246, 242, 232, .6); }
.hub-trends-hero .hub-breadcrumb a { color: rgba(246, 242, 232, .7); }
.hub-trends-hero h1 { font-size: clamp(32px, 5vw, 52px); color: #fdfaf2; margin: 12px 0 12px; font-weight: 500; }
.hub-trends-hero h1 em { font-style: italic; color: var(--hub-gold-on-dark); }
.hub-trends-hero p { max-width: 660px; color: rgba(246, 242, 232, .76); }
.hub-trend-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.hub-trends-shell { padding-top: 34px; padding-bottom: 64px; }
.hub-trends-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.hub-trend-panel { height: 100%; }
.hub-trend-note { display: block; font-size: 11.5px; color: var(--hub-muted); margin-top: 2px; }
.hub-trend-window { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--hub-gold-deep); background: var(--hub-gold-soft); border-radius: 999px; padding: 4px 9px; }
.hub-trend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hub-trend-row { display: flex; gap: 10px; }
.hub-trend-rank { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--hub-cream); color: var(--hub-navy); font-size: 11px; font-weight: 800; flex-shrink: 0; }
.hub-trend-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.hub-trend-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hub-trend-line strong { font-size: 13px; font-weight: 700; color: var(--hub-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-trend-delta { font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.hub-trend-up { background: var(--hub-green-soft); color: var(--hub-green); }
.hub-trend-down { background: var(--hub-red-soft); color: var(--hub-red); }
.hub-trend-flat { background: #ececec; color: var(--hub-muted); }
.hub-trend-bar { height: 6px; border-radius: 999px; background: #ece8dc; overflow: hidden; }
.hub-trend-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--hub-gold-deep), var(--hub-gold)); }
.hub-trend-sub { font-size: 10.5px; color: var(--hub-muted); }
.hub-trends-posts { margin-top: 40px; }
.hub-trends-cta { margin-top: 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: linear-gradient(150deg, #f1ecff, #fbf6e8); border-color: #e0d8f6; padding: 26px 28px; }
.hub-trends-cta h2 { font-size: 25px; margin: 4px 0 8px; }
.hub-trends-cta p { font-size: 13.5px; color: var(--hub-muted); max-width: 560px; }
.hub-trends-cta-actions { display: flex; flex-wrap: wrap; gap: 9px; }

/* ---------------------------------------------------------------- Footer */
.hub-footer { background: var(--hub-navy-deep); color: rgba(246, 242, 232, .72); padding: 44px 0 0; margin-top: 20px; }
.hub-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.15fr 1.05fr; gap: 26px; padding-bottom: 34px; }
.hub-f-brand-row { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.hub-f-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--hub-violet); color: #fff; }
.hub-f-mark svg { width: 18px; height: 18px; }
.hub-f-name { font-size: 12.5px; font-weight: 800; letter-spacing: .16em; color: #fff; }
.hub-f-name em { font-style: normal; color: var(--hub-gold-on-dark); }
.hub-f-brand p { font-size: 12.5px; line-height: 1.65; max-width: 330px; }
.hub-f-col h4 { font-family: var(--hub-sans); font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: rgba(255, 255, 255, .45); margin-bottom: 12px; }
.hub-f-col a { display: block; font-size: 13px; padding: 4px 0; color: rgba(246, 242, 232, .72); }
.hub-f-col a:hover { color: var(--hub-gold-on-dark); }
.hub-f-contact p { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 12.5px; line-height: 1.6; }
.hub-f-contact p span { color: var(--hub-gold-on-dark); font-size: 16px; }
.hub-footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 22px 22px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 11.5px; }
.hub-back-top { background: none; border: 0; color: rgba(246, 242, 232, .7); font-size: 11.5px; cursor: pointer; }
.hub-back-top:hover { color: var(--hub-gold-on-dark); }

/* ---------------------------------------------------------------- Toast */
.hub-toast {
    position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
    background: var(--hub-navy); color: #fff; padding: 11px 20px; border-radius: 999px;
    font-size: 13px; font-weight: 600; box-shadow: 0 16px 40px rgba(13, 18, 32, .35);
    opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 90;
}
.hub-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1080px) {
    .hub-top-links { display: none; }
    .hub-menu-btn { display: block; }
    .hub-top-actions { margin-left: auto; }
    .hub-shell, .hub-post-shell, .hub-topic-shell { grid-template-columns: minmax(0, 1fr); }
    .hub-aside, .hub-post-aside { position: static; }
    .hub-aside { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .hub-sticky { position: static; }
    .hub-trends-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .hub-hero-inner { grid-template-columns: 1fr; gap: 26px; padding-top: 42px; padding-bottom: 40px; }
    .hub-hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hub-stat { padding: 12px 14px; }
    .hub-stat strong { font-size: 22px; }
    .hub-trend-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hub-filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hub-featured-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
    .hub-feature-lead { grid-row: span 1; grid-column: span 2; min-height: 260px; }
    .hub-footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
    .hub-f-brand, .hub-f-contact { grid-column: span 2; }
    .hub-f-brand p { max-width: none; }
    .hub-article { padding: 24px 24px 32px; }
    .hub-article-cover { margin: 22px -24px 0; }
    .hub-prose { font-size: 16px; }
}

@media (max-width: 640px) {
    body { font-size: 14.5px; }
    .hub-wrap { padding: 0 16px; }
    .hub-hide-xs { display: none; }
    .hub-show-xs { display: inline; }
    .hub-topbar-inner { min-height: 60px; gap: 12px; }
    .hub-brand-text { font-size: 11.5px; letter-spacing: .08em; }
    .hub-brand-mark { width: 30px; height: 30px; border-radius: 9px; }
    .hub-brand-mark svg { width: 18px; height: 18px; }
    .hub-progress { top: 60px; }
    .hub-top-actions .hub-btn-outline { display: none; }
    .hub-hero-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .hub-stat { padding: 10px 11px; border-radius: 11px; }
    .hub-stat strong { font-size: 19px; }
    .hub-stat span { font-size: 9.5px; }
    .hub-search { padding-left: 12px; }
    .hub-search input { font-size: 13.5px; padding: 10px 8px; }
    .hub-search-go { padding: 10px 15px; font-size: 12.5px; }
    /* Comfortable tap targets on phones. */
    .hub-chip { padding: 7px 13px; }
    .hub-card-topics .hub-chip { padding: 6px 10px; }
    .hub-follow-mini { padding: 7px 10px; font-size: 10.5px; }
    .hub-grid { grid-template-columns: 1fr; }
    .hub-filter-row { grid-template-columns: 1fr 1fr; }
    .hub-featured-grid { grid-template-columns: 1fr; }
    .hub-feature-lead { grid-column: span 1; }
    .hub-feature { min-height: 190px; }
    .hub-feature-lead { min-height: 250px; }
    .hub-section-head h2 { font-size: 21px; }
    .hub-tabs { width: 100%; }
    .hub-tab { flex: 1; text-align: center; }
    .hub-trend-stats { grid-template-columns: 1fr 1fr; }
    .hub-trends-cta { padding: 20px; }
    .hub-trends-cta h2 { font-size: 21px; }
    .hub-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 18px; }
    .hub-f-brand, .hub-f-contact { grid-column: span 2; }
    .hub-f-brand p { max-width: none; }
    .hub-f-col h4 { margin-bottom: 8px; }
    .hub-f-col a { padding: 5px 0; }
    .hub-footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
    .hub-aside { grid-template-columns: 1fr; }
    .hub-article { border: 0; background: transparent; border-radius: 0; padding: 4px 0 20px; }
    .hub-article-cover { margin: 20px 0 0; border-radius: 12px; }
    .hub-post-shell { padding-top: 22px; }
    .hub-author-card { flex-direction: column; align-items: flex-start; }
    .hub-comment-form-foot { flex-direction: column; align-items: flex-start; }
    .hub-shop { padding: 16px; }
    .hub-shop-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .hub-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hub-pagination { flex-wrap: wrap; justify-content: center; }
    .hub-page-count { order: 3; width: 100%; text-align: center; }
    .hub-prose { font-size: 16px; line-height: 1.72; }
    .hub-prose h2 { font-size: 23px; }
    .hub-prose h3 { font-size: 20px; }
    .hub-topic-hero-row { flex-direction: column; align-items: flex-start; }
    .hub-toast { left: 16px; right: 16px; bottom: 16px; transform: translateY(20px); text-align: center; }
    .hub-toast.show { transform: translateY(0); }
}

@media (max-width: 380px) {
    .hub-brand-text { font-size: 10.5px; letter-spacing: .04em; }
    .hub-topbar-inner { gap: 8px; }
    .hub-top-actions { gap: 6px; }
    /* "My studio" stays one tap away in the menu; hiding it keeps the bar on-screen. */
    .hub-top-actions .hub-btn-studio { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
