/* ═══════════════════════════════════════════════════
   brick.news — Frontend Stylesheet
   Editorial design with warm tones and strong typography
   ═══════════════════════════════════════════════════ */

:root {
    --color-bg:       #FAF8F5;
    --color-surface:  #FFFFFF;
    --color-text:     #1A1A1A;
    --color-text-2:   #5C5C5C;
    --color-text-3:   #9A9A9A;
    --color-border:   #E8E4DF;
    --color-primary:  #4050B5;
    --color-primary-h:#3545A0;
    --color-accent:   #E67E22;
    --color-success:  #27AE60;
    --color-warning:  #F39C12;
    --color-danger:   #E74C3C;
    --color-info:     #2980B9;

    --font-display:   'Outfit', -apple-system, sans-serif;
    --font-body:      'Lexend', -apple-system, sans-serif;

    --container:      1200px;
    --container-narrow: 780px;
    --container-xs:   440px;
    --radius:         6px;
    --radius-lg:      12px;
    --shadow:         0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-lg:      0 10px 25px rgba(0,0,0,.08);
    --transition:     .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.5rem; }
.container-xs { max-width: var(--container-xs); margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-h); }

img { max-width: 100%; height: auto; display: block; }

/* ═══ BUTTONS ═════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .6rem 1.4rem; border-radius: var(--radius); font: 600 .875rem/1.4 var(--font-body);
    border: 1px solid transparent; cursor: pointer; transition: all var(--transition);
    text-decoration: none;
}
.btn-primary   { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-h); color: #fff; }
.btn-outline   { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-text); }
.btn-ghost     { background: transparent; color: var(--color-text-2); }
.btn-ghost:hover { color: var(--color-text); }
.btn-danger    { background: var(--color-danger); color: #fff; }
.btn-sm        { padding: .35rem .9rem; font-size: .8rem; }
.btn-xs        { padding: .2rem .6rem; font-size: .75rem; }
.btn-full      { width: 100%; }
.btn-success   { background: var(--color-success); color: #fff; }
.btn-warning   { background: var(--color-warning); color: #fff; }

/* ═══ HEADER ══════════════════════════════════════ */
.site-header {
    background: #1A1A1A;
    position: sticky; top: 0; z-index: 100;
    height: 92px; display: flex; align-items: center;
}
.header-inner {
    display: flex; align-items: center; gap: 25rem;
    width: 100%; height: 100%;
}
.site-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-img { height: 40px; width: auto; }

/* Left group: logo + search — takes ALL remaining space */
.header-left {
    display: flex; align-items: center; gap: 1rem;
    flex: 1 1 0%; min-width: 0;
}

/* Right group: nav + auth — fixed size, flush right */
.header-right {
    display: flex; align-items: center; gap: .35rem; flex-shrink: 0;
}

/* ── Nav search (desktop) ── */
.nav-search-desktop { position: relative; flex: 1 1 0%; min-width: 400px; }
.nav-search-input {
    width: 100%; padding: .5rem 2.75rem .5rem 1rem; height: 36px;
    border: 1px solid rgba(255,255,255,.15); border-radius: 100px;
    font: .82rem var(--font-body); background: rgba(255,255,255,.06); color: #fff;
    transition: all .2s; outline: none; box-sizing: border-box;
}
.nav-search-input::placeholder { color: rgba(255,255,255,.4); font-size: .78rem; }
.nav-search-input:focus {
    background: #fff; color: var(--color-text);
    border-color: #4050B5; box-shadow: 0 0 0 3px rgba(64,80,181,.2);
}
.nav-search-input:focus::placeholder { color: var(--color-text-3); }
.nav-search-btn {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,.5); font-size: 1.05rem;
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: all .15s;
}
.nav-search-btn:hover { color: #fff; background: rgba(255,255,255,.1); }
.nav-search-input:focus ~ .nav-search-btn { color: var(--color-text-3); }
.nav-search-input:focus ~ .nav-search-btn:hover { color: #4050B5; background: rgba(64,80,181,.08); }

/* Search icon (mobile only) */
.nav-search-mobile {
    display: none; color: rgba(255,255,255,.8); font-size: 1.2rem;
    width: 36px; height: 36px; border-radius: 50%;
    align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,.25); text-decoration: none;
    transition: all .15s;
}
.nav-search-mobile:hover { color: #fff; border-color: rgba(255,255,255,.5); }

/* ── Nav buttons (36px tall, pill shape) ── */
.main-nav { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
.nav-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    height: 36px; padding: 0 1.25rem;
    font: 500 .82rem/1 var(--font-body); text-decoration: none;
    border-radius: 100px; transition: all .15s; white-space: nowrap;
    cursor: pointer; box-sizing: border-box; border: none;
}
/* Nav links (Explore, Events, Brick Deals) — no border */
.nav-btn-ghost {
    background: transparent; color: rgba(255,255,255,.85); border: none;
}
.nav-btn-ghost:hover { color: #fff; background: rgba(255,255,255,.08); }

/* Login button — black bg + white circular border */
.nav-btn-secondary {
    background: #1A1A1A; color: rgba(255,255,255,.85);
    border: 1px solid rgba(255,255,255,.3);
}
.nav-btn-secondary:hover { color: #fff; border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.06); }

/* Sign Up — primary */
.nav-btn-primary {
    background: #4050B5; color: #fff; border: 1px solid #4050B5;
}
.nav-btn-primary:hover { background: #3444A0; border-color: #3444A0; color: #fff; }

/* Chevron down indicator */
.nav-chevron { font-size: .7rem; margin-left: -.1rem; opacity: .6; transition: transform .2s; }
.nav-dropdown.open .nav-chevron { transform: rotate(180deg); }

/* ── Dropdowns ── */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { cursor: pointer; }
.nav-dropdown-menu {
    display: none; position: absolute; top: calc(100% + 8px); left: 0;
    background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.15);
    min-width: 220px; padding: .5rem 0; z-index: 200;
    border: 1px solid rgba(0,0,0,.06);
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-link {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem 1rem; font: 400 .85rem/1 var(--font-body); color: var(--color-text);
    text-decoration: none; transition: background .1s;
}
.nav-dropdown-link:hover { background: #f5f5f5; }
.nav-dropdown-link i { font-size: 1rem; color: var(--color-text-3); flex-shrink: 0; }
.nav-dropdown-divider { height: 1px; background: #f0f0f0; margin: .25rem 0; }
.nav-dropdown-danger { color: #DC2626; }
.nav-dropdown-danger:hover { background: #FEF2F2; }

/* ── User avatar ── */
.nav-user-trigger {
    display: flex; align-items: center;
    background: none; border: none; cursor: pointer; padding: 0;
}
.nav-avatar-img {
    width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,.2); transition: border-color .15s;
}
.nav-user-trigger:hover .nav-avatar-img { border-color: rgba(255,255,255,.5); }
.nav-avatar-letter {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: #4050B5; color: #fff; font: 600 .85rem var(--font-body);
    border: 2px solid rgba(255,255,255,.2); transition: border-color .15s;
}
.nav-user-trigger:hover .nav-avatar-letter { border-color: rgba(255,255,255,.5); }
.nav-user-menu { right: 0; left: auto; min-width: 240px; }
.nav-user-header { padding: .75rem 1rem .5rem; border-bottom: 1px solid #f0f0f0; }
.nav-user-header strong { display: block; font-size: .88rem; color: var(--color-text); }
.nav-user-header span { font-size: .75rem; color: var(--color-text-3); }

/* ── Header actions ── */
.header-actions { display: flex; align-items: center; gap: .5rem; }
.mobile-toggle {
    display: none; background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,.85); font-size: 1.5rem; padding: 0;
    width: 36px; height: 36px; align-items: center; justify-content: center;
}

/* ── Mobile menu panel ── */
.mobile-menu {
    display: none; position: fixed; top: 92px; left: 0; right: 0;
    background: #1A1A1A; z-index: 99; padding: 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    max-height: calc(100vh - 92px); overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu-search { position: relative; margin-bottom: .75rem; }
.mobile-menu-search .nav-search-input { width: 100%; height: 40px; font-size: .85rem; }
.mobile-menu-search .nav-search-btn { right: 6px; width: 32px; height: 32px; }
.mobile-menu-link {
    display: flex; align-items: center; gap: .6rem;
    padding: .65rem .5rem; color: rgba(255,255,255,.85);
    text-decoration: none; font: 500 .9rem var(--font-body);
    border-radius: 8px; transition: background .1s;
}
.mobile-menu-link:hover { background: rgba(255,255,255,.06); }
.mobile-menu-link i { font-size: 1.1rem; opacity: .6; }
.mobile-menu-sublink { padding-left: 1.5rem; font-weight: 400; font-size: .85rem; }
.mobile-menu-divider { height: 1px; background: rgba(255,255,255,.08); margin: .5rem 0; }
.mobile-menu-heading {
    font: 600 .65rem var(--font-body); color: rgba(255,255,255,.35);
    text-transform: uppercase; letter-spacing: .06em; padding: .6rem .5rem .25rem;
}

/* ── Beta banner ── */
.site-beta-banner {
    background: #FFFBEB; border-bottom: 1px solid #FDE68A;
    font-size: .78rem; color: #92400E; text-align: center;
    padding: .45rem 1rem; line-height: 1.4;
}
.site-beta-banner i { margin-right: .3rem; vertical-align: middle; }

/* ═══ HERO ════════════════════════════════════════ */
.hero-banner {
    text-align: center; padding: 4rem 0 3rem;
}
.hero-title {
    font: 300 3rem/1.15 var(--font-display); letter-spacing: -.02em;
}
.hero-title em { font-style: italic; color: var(--color-primary); }
.hero-sub { font-size: 1.1rem; color: var(--color-text-2); margin-top: .75rem; }

/* ═══ ARTICLE GRID ════════════════════════════════ */
.article-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
    padding-bottom: 3rem;
}
.article-card {
    background: var(--color-surface); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.article-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.article-card.featured .card-image img { height: 100%; object-fit: cover; }

.card-image { position: relative; overflow: hidden; }
.card-image img { width: 100%; height: 220px; object-fit: cover; transition: transform .4s ease; }
.article-card:hover .card-image img { transform: scale(1.03); }
.card-type {
    position: absolute; top: .75rem; left: .75rem;
    background: var(--color-primary); color: #fff;
    font: 600 .65rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .08em;
    padding: .3rem .6rem; border-radius: 3px;
}

.card-body { padding: 1.25rem; }
.card-category { font: 600 .7rem/1 var(--font-body); color: var(--color-accent); text-transform: uppercase; letter-spacing: .06em; }
.card-title { font: 600 1.15rem/1.3 var(--font-display); margin: .5rem 0; }
.card-title a { color: var(--color-text); }
.card-title a:hover { color: var(--color-primary); }
.card-excerpt { font-size: .9rem; color: var(--color-text-2); line-height: 1.5; margin-bottom: .75rem; }
.card-meta { font-size: .78rem; color: var(--color-text-3); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.meta-sep { opacity: .4; }

/* ═══ ARTICLE SINGLE ══════════════════════════════ */
.article-single { padding: 2rem 0 4rem; }
.article-header { text-align: center; margin-bottom: 2.5rem; }
.article-category { font: 600 .75rem/1 var(--font-body); color: var(--color-accent); text-transform: uppercase; letter-spacing: .06em; }
.article-title { font: 300 2.5rem/1.2 var(--font-display); margin: .75rem 0; letter-spacing: -.02em; }
.article-summary { font: 1.1rem/1.6 var(--font-body); color: var(--color-text-2); margin-top: 1rem; }
.article-meta { font-size: .85rem; color: var(--color-text-3); display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1rem; }

.article-hero-image { margin: 0 -2rem 2.5rem; }
.article-hero-image img { width: 100%; border-radius: var(--radius-lg); }

.article-body.prose { font: 1.05rem/1.8 var(--font-body); }
.prose h2 { font: 600 1.6rem/1.3 var(--font-display); margin: 2rem 0 1rem; }
.prose h3 { font: 600 1.3rem/1.3 var(--font-display); margin: 1.5rem 0 .75rem; }
.prose p  { margin-bottom: 1.2rem; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose blockquote {
    border-left: 3px solid var(--color-primary); padding: .75rem 1.5rem;
    margin: 1.5rem 0; font-style: italic; color: var(--color-text-2);
}
.prose ul, .prose ol { margin: 1rem 0 1rem 2rem; }
.prose li { margin-bottom: .5rem; }
.prose code { background: #F0ECE6; padding: .15rem .4rem; border-radius: 3px; font-size: .9em; }
.prose pre { background: #2D2D2D; color: #F8F8F2; padding: 1.5rem; border-radius: var(--radius); overflow-x: auto; margin: 1.5rem 0; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

/* Review / Interview / Guide boxes */
.article-review-box, .article-interview-box, .guide-box {
    background: var(--color-bg); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); padding: 2rem; margin: 2.5rem 0;
}
.article-review-box h3, .article-interview-box h3, .guide-box h3 {
    font: 700 1.2rem/1 var(--font-display); margin-bottom: 1rem;
}
.review-rating { display: flex; align-items: baseline; gap: .3rem; margin-bottom: 1.5rem; }
.rating-score { font: 700 3rem/1 var(--font-display); color: var(--color-primary); }
.rating-max { font-size: 1.2rem; color: var(--color-text-3); }
.review-pros h4, .review-cons h4, .review-verdict h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-2); margin: 1rem 0 .5rem; }
.guide-box.guide-warnings { border-color: var(--color-warning); background: #FEF9F0; }

/* Tags */
.article-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin: 2rem 0; }
.tag { padding: .35rem .8rem; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 20px; font-size: .8rem; color: var(--color-text-2); }
.tag:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* Actions bar */
/* ── Article action pills (top + bottom) ── */
.article-pills {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem;
    padding: 1rem 0;
}
.article-pills-top {
    margin-top: .75rem; border: none;
}
.article-pills-bottom {
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin: 2rem 0 2.5rem; padding: 1rem 0;
}
.pill-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    height: 34px; padding: 0 .85rem;
    background: var(--color-bg-card, #fff);
    border: 1px solid var(--color-border);
    border-radius: 100px; cursor: pointer;
    font: 500 .8rem/1 var(--font-body); color: var(--color-text-2);
    text-decoration: none; transition: all .15s;
    position: relative;
}
.pill-btn i { font-size: 1rem; }
.pill-btn:hover {
    border-color: var(--color-primary); color: var(--color-primary);
    background: rgba(64,80,181,.04);
}
.pill-btn.active {
    border-color: #DC2626; color: #DC2626; background: rgba(220,38,38,.04);
}
.pill-btn.active[data-action="save"] {
    border-color: #F59E0B; color: #F59E0B; background: rgba(245,158,11,.04);
}
.pill-label { }
.pill-count {
    font-weight: 700; font-size: .75rem;
    background: var(--color-border); border-radius: 100px;
    padding: .1rem .4rem; min-width: 18px; text-align: center;
    color: var(--color-text-2); line-height: 1.3;
}
.pill-btn.active .pill-count { background: rgba(220,38,38,.1); color: #DC2626; }
.pill-btn.active[data-action="save"] .pill-count { background: rgba(245,158,11,.1); color: #92400E; }

/* Tooltip on hover */
.pill-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%);
    background: #1A1A1A; color: #fff;
    font: 500 .7rem/1 var(--font-body);
    padding: .3rem .55rem; border-radius: 5px;
    white-space: nowrap; pointer-events: none; z-index: 10;
}
.pill-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute; bottom: calc(100% + 3px); left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent; border-top-color: #1A1A1A;
    pointer-events: none; z-index: 10;
}

/* Hide old sidebar and action bar */
.article-sidebar, .article-actions { display: none; }
.article-layout { display: block; }
.article-content { width: 100%; }

@media (max-width: 500px) {
    .pill-label { display: none; }
    .pill-btn { padding: 0 .6rem; height: 32px; }
}

/* Social links */
.interviewer-socials { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.social-link { padding: .3rem .8rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 4px; font-size: .8rem; }

/* ═══ COMMENTS ════════════════════════════════════ */
.comments-section { margin-top: 3rem; }
.comments-title { font: 600 1.4rem/1 var(--font-display); margin-bottom: 1.5rem; }
.comment { display: flex; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--color-border); }
.comment-avatar img, .avatar-placeholder { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-placeholder { background: var(--color-border); display: flex; align-items: center; justify-content: center; font: 600 .85rem var(--font-body); color: var(--color-text-2); }
.comment-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .3rem; }
.comment-author { font-size: .9rem; }
.comment-date { font-size: .78rem; color: var(--color-text-3); }
.comment-body { font-size: .92rem; line-height: 1.6; }

.comment-form-wrapper { margin-top: 2rem; }
.comment-form-wrapper h3 { font: 600 1.1rem/1 var(--font-display); margin-bottom: 1rem; }

/* ═══ FORMS ═══════════════════════════════════════ */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font: 600 .85rem/1.4 var(--font-body); margin-bottom: .35rem; }
.form-input, .form-textarea, .form-select {
    width: 100%; padding: .6rem .9rem; border: 1px solid var(--color-border);
    border-radius: var(--radius); font: .9rem/1.5 var(--font-body);
    background: var(--color-surface); transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--color-primary); }
.form-input-lg { font-size: 1.2rem; padding: .8rem 1rem; }
.form-row { display: flex; gap: 1rem; }
.form-row > * { flex: 1; }
.form-help { display: block; font-size: .78rem; color: var(--color-text-3); margin-top: .3rem; }
.form-file { font-size: .85rem; }
.form-checkbox { display: flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }

/* ═══ AD BANNER ═══════════════════════════════════ */
.ad-banner { position: relative; text-align: center; margin: 1.5rem 0; padding: .5rem; background: var(--color-bg); border-radius: var(--radius); }
.ad-banner img { max-height: 200px; margin: 0 auto; border-radius: var(--radius); }
.ad-label { position: absolute; top: .3rem; right: .5rem; font: 500 .6rem/1 var(--font-body); color: var(--color-text-3); text-transform: uppercase; letter-spacing: .08em; }

/* ═══ SEARCH ══════════════════════════════════════ */
.search-form-full { display: flex; gap: .75rem; margin: 1.5rem 0 2rem; }
.search-input-lg { flex: 1; font-size: 1.1rem; padding: .8rem 1.2rem; }
.search-results-count { color: var(--color-text-2); margin-bottom: 1.5rem; }
.search-result-item { padding: 1rem 0; border-bottom: 1px solid var(--color-border); }
.search-result-item h2 { font: 500 1.1rem/1.3 var(--font-display); }
.result-meta { font-size: .8rem; color: var(--color-text-3); display: flex; gap: .4rem; margin-top: .3rem; }
.tag-sm { background: var(--color-bg); padding: .1rem .4rem; border-radius: 3px; font-size: .75rem; }

/* ═══ AUTH ═════════════════════════════════════════ */
.auth-card { background: var(--color-surface); border-radius: var(--radius-lg); padding: 2.5rem; margin: 4rem auto; box-shadow: var(--shadow-lg); }
.auth-title { font: 300 1.8rem/1 var(--font-display); text-align: center; margin-bottom: 2rem; }
.auth-links { text-align: center; margin-top: 1.5rem; font-size: .85rem; color: var(--color-text-3); }
.auth-sep { margin: 0 .5rem; }

/* Google sign-in button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: var(--radius, 6px);
    padding: .7rem 1.25rem;
    font: 500 .92rem/1 var(--font-body);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    color: #3c4043;
    text-decoration: none;
}
.btn-google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-facebook {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    background: #1877F2;
    color: #fff;
    border: 1px solid #1877F2;
    border-radius: var(--radius, 6px);
    padding: .7rem 1.25rem;
    font: 500 .92rem/1 var(--font-body);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
    margin-top: .6rem;
}
.btn-facebook:hover {
    background: #166FE5;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    color: #fff;
    text-decoration: none;
}
.btn-facebook-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* "or" divider between Google and email form */
.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0;
    color: var(--color-text-3);
    font-size: .8rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}
/* Tighter spacing inside the softgate panel */
.softgate-divider { margin: .9rem 0; }
/* Extra bottom margin after the divider in the prompt view before the CTA buttons */
.softgate-google-prompt + .softgate-divider { margin-bottom: .5rem; }

/* ═══ ALERTS ══════════════════════════════════════ */
.alert { padding: .8rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: .9rem; }
.alert-success { background: #E8F5E9; color: #2E7D32; border: 1px solid #C8E6C9; }
.alert-danger  { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }
.alert-warning { background: #FFF8E1; color: #F57F17; border: 1px solid #FFF9C4; }
.alert-info    { background: #E3F2FD; color: #1565C0; border: 1px solid #BBDEFB; }

/* ═══ PAGINATION ══════════════════════════════════ */
.pagination { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: 2.5rem 0 1.5rem; }
.pagination-num {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 .5rem;
    font: 500 .85rem/1 var(--font-body); color: var(--color-text-2);
    text-decoration: none; border-radius: 8px; transition: all .15s;
}
.pagination-num:hover { background: var(--color-border); color: var(--color-text); }
.pagination-num.active {
    background: var(--color-primary); color: #fff; font-weight: 600;
    pointer-events: none;
}
.pagination-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; font-size: 1rem;
    color: var(--color-text-2); text-decoration: none;
    border-radius: 8px; transition: all .15s;
}
.pagination-btn:hover { background: var(--color-border); color: var(--color-text); }
.pagination-dots { font-size: .85rem; color: var(--color-text-3); padding: 0 .15rem; }

/* ═══ ERROR PAGES ═════════════════════════════════ */
.error-page { text-align: center; padding: 6rem 0; }
.error-code { font: 700 8rem/1 var(--font-display); color: var(--color-border); letter-spacing: -.05em; }
.error-title { font: 300 2rem/1.3 var(--font-display); margin: 1rem 0; }
.error-message { color: var(--color-text-2); margin-bottom: 2rem; }
.error-actions { display: flex; gap: 1rem; justify-content: center; }
.error-graphic { margin-top: 3rem; display: flex; justify-content: center; gap: .5rem; }
.brick { width: 50px; height: 25px; border-radius: 3px; }
.b1 { background: var(--color-primary); transform: rotate(-5deg); }
.b2 { background: var(--color-accent); transform: rotate(3deg) translateY(-10px); }
.b3 { background: var(--color-warning); transform: rotate(-2deg); }
.b4 { background: var(--color-info); transform: rotate(5deg) translateY(-8px); }

/* ═══ EMPTY STATE ═════════════════════════════════ */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--color-text-3); }

/* ═══ FOOTER ══════════════════════════════════════ */
.site-footer { background: var(--color-text); color: #ccc; padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 3rem; margin-bottom: 2rem; }
.footer-brand { max-width: 280px; flex-shrink: 0; }
.footer-brand .logo-text { color: #fff; }
.footer-motto { font: 600 1rem/1 var(--font-display); color: #fff; margin-top: .75rem; }
.footer-desc { font-size: .82rem; line-height: 1.55; color: #888; margin-top: .5rem; }
.footer-links { display: flex; gap: 3rem; }
.footer-col h4 { font: 600 .8rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: #888; margin-bottom: .75rem; }
.footer-col a { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: #aaa; margin-bottom: .4rem; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-col a i { font-size: .95rem; }
.footer-bottom { border-top: 1px solid #333; padding-top: 1rem; font-size: .78rem; color: #666; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.5rem; }
.footer-trademark { font-size: .7rem; color: #555; }
.footer-eu { font-size: .78rem; color: #666; margin-left: auto; }

/* Preview banner for draft/private content */
.preview-banner {
    background: #FFF3CD;
    color: #856404;
    border: 1px solid #FFEEBA;
    border-radius: var(--radius);
    padding: .75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: .85rem;
    line-height: 1.5;
}
.preview-banner a {
    color: #856404;
    font-weight: 600;
    margin-left: .5rem;
    text-decoration: underline;
}

/* ═══ PAGE HEADING ════════════════════════════════ */
.page-heading { font: 300 2.2rem/1.2 var(--font-display); margin: 2rem 0; letter-spacing: -.01em; }

/* ═══ RESPONSIVE ══════════════════════════════════ */
@media (max-width: 900px) {
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .article-card.featured { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.2rem; }
    .footer-inner { flex-direction: column; }
}
@media (max-width: 600px) {
    .article-grid { grid-template-columns: 1fr; }
    .article-title { font-size: 1.8rem; }
    .form-row { flex-direction: column; }
    .search-form-full { flex-direction: column; }
    .footer-links { flex-direction: column; gap: 1.5rem; }
    .footer-eu { margin-left: 0; }
    .footer-bottom { flex-direction: column; gap: .35rem; }
}

/* Nav responsive: shrink search at 900px */
@media (max-width: 900px) {
    .nav-search-desktop { min-width: 120px; }
}

/* Nav responsive: collapse to mobile at 768px */
@media (max-width: 768px) {
    .header-inner { gap: 0; justify-content: space-between; }
    .mobile-toggle { display: flex; align-items: center; }
    .main-nav { display: none; }
    .nav-search-desktop { display: none; }
    .nav-search-mobile { display: flex; }
    /* Hide Login/Sign Up — they live inside the mobile menu instead */
    .nav-login-btn,
    .header-actions .nav-btn-primary { display: none; }
}

/* ═══════════════════════════════════════════════════
   Comment Badge System
   ═══════════════════════════════════════════════════ */

.comment-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .03em;
    padding: .15em .55em;
    border-radius: 3px;
    line-height: 1.4;
    vertical-align: middle;
    margin-left: .4rem;
    white-space: nowrap;
    text-transform: uppercase;
}

/* ── Role badges (highest priority) ── */
.badge-author {
    background: #1a1a2e;
    color: #e9c46a;
}
.badge-admin {
    background: #7b2cbf;
    color: #fff;
}
.badge-editor {
    background: #2d6a4f;
    color: #d8f3dc;
}

/* ── Activity badges ── */
.badge-new {
    background: #e8e4df;
    color: #6b6560;
}
.badge-basic {
    background: #dfe7fd;
    color: #4361ee;
}
.badge-bronze {
    background: #f0e0cf;
    color: #a0522d;
}
.badge-silver {
    background: #e8e8e8;
    color: #555;
    border: 1px solid #ccc;
}
.badge-gold {
    background: linear-gradient(135deg, #f7e98e, #f0c040);
    color: #5c4813;
}
.badge-rare {
    background: linear-gradient(135deg, #a8edea, #5cc2c0);
    color: #1a3c3a;
}
.badge-epic {
    background: linear-gradient(135deg, #c471f5, #7d5fff);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.badge-legendary {
    background: linear-gradient(135deg, #ff6b35, #ff3366, #ff6b35);
    background-size: 200% 200%;
    animation: badge-shimmer 3s ease infinite;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.3);
    box-shadow: 0 0 6px rgba(255,51,102,.3);
}

@keyframes badge-shimmer {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Comment kindness reminder */
.comment-kindness {
    font-size: .82rem;
    color: #856404;
    background: #FFF9E6;
    border-left: 3px solid #F59E0B;
    padding: .6rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    line-height: 1.5;
}

/* ═══ Review Criteria (Admin) ═══════════════════ */
.review-criteria-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem 1.5rem;
    margin-bottom: 1rem;
}
.review-criterion { display: flex; align-items: center; gap: .5rem; }
.review-criterion label { flex: 1; font-size: .85rem; font-weight: 500; min-width: 100px; }
.review-criterion input[type="number"] { width: 80px; text-align: center; }
/* "No Minifigures" checkbox label sits after the score input */
.review-na-label {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    font-weight: 400;
    color: var(--color-text-2, #666);
    white-space: nowrap;
    cursor: pointer;
    flex: none;
    min-width: auto;
}
.review-na-label input[type="checkbox"] { width: auto; margin: 0; }
.review-total-display {
    background: var(--color-bg, #f5f5f5);
    border-radius: var(--radius, 6px);
    padding: .75rem 1rem;
    font-size: 1rem;
    color: var(--color-text, #333);
    margin-bottom: 1rem;
}
.review-total-display strong { color: #4050B5; font-size: 1.3rem; }

/* ═══ Review Criteria (Frontend) ════════════════ */
.review-criteria-list { margin: 1.25rem 0; }
.review-criterion-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .6rem;
}
.criterion-label {
    font-size: .82rem;
    font-weight: 500;
    color: var(--color-text-2, #555);
    min-width: 100px;
    flex-shrink: 0;
}
.criterion-bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--color-border, #e0e0e0);
    border-radius: 4px;
    overflow: hidden;
}
.criterion-bar {
    height: 100%;
    background: #4050B5;
    border-radius: 4px;
    transition: width .4s ease;
}
.criterion-score {
    font-size: .82rem;
    font-weight: 600;
    color: #4050B5;
    min-width: 28px;
    text-align: right;
}
/* N/A criterion row — Minifigures not included in the set */
.review-criterion-na { opacity: .7; }
.criterion-bar-wrap-na {
    display: flex;
    align-items: center;
    background: none;
    overflow: visible;
}
.criterion-na-text {
    font-size: .75rem;
    font-style: italic;
    color: var(--color-text-2, #888);
}
.criterion-score-na {
    color: var(--color-text-2, #888);
    font-weight: 500;
    font-style: italic;
}

@media (max-width: 600px) {
    .review-criteria-grid { grid-template-columns: 1fr; }
    .criterion-label { min-width: 80px; font-size: .78rem; }
}

/* ═══ Admin: LEGO Ideas article picker ══════════ */
.ideas-search-dropdown {
    position: relative;
    background: var(--color-bg-card, #fff);
    border: 1px solid var(--color-border, #ddd);
    border-radius: var(--radius, 6px);
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 50;
    margin-top: .25rem;
}
.ideas-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem .75rem;
    cursor: pointer;
    font-size: .82rem;
    border-bottom: 1px solid var(--color-border, #eee);
}
.ideas-search-item:hover { background: var(--color-bg, #f5f5f5); }
.ideas-search-item:last-child { border-bottom: 0; }
.ideas-search-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ideas-search-status { font-size: .72rem; color: var(--color-text-3, #999); margin-left: .5rem; text-transform: capitalize; }
.ideas-no-results { color: var(--color-text-3, #999); cursor: default; }
.ideas-no-results:hover { background: transparent; }

/* ═══ Frontend: LEGO Ideas Block ════════════════ */
.ideas-block {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 1px solid #FDE68A;
    border-radius: var(--radius, 8px);
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.ideas-header { margin-bottom: 1rem; }
.ideas-badge {
    display: inline-block;
    background: #F59E0B;
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    padding: .25rem .7rem;
    border-radius: 20px;
    letter-spacing: .02em;
}

/* Progress milestones */
.ideas-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 1.25rem 0;
}
.ideas-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    opacity: .4;
    transition: opacity .3s;
}
.ideas-milestone-active { opacity: 1; }
.ideas-milestone-current .ideas-milestone-dot {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .25);
}
.ideas-milestone-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #D1D5DB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all .3s;
}
.ideas-milestone-active .ideas-milestone-dot {
    border-color: #F59E0B;
    background: #FFFBEB;
}
.ideas-milestone span {
    font-size: .72rem;
    font-weight: 500;
    color: var(--color-text-2, #666);
    text-align: center;
    max-width: 80px;
}
.ideas-connector {
    flex: 1;
    height: 3px;
    background: #D1D5DB;
    min-width: 30px;
    max-width: 80px;
    margin: 0 .25rem;
    margin-bottom: 1.5rem;
    border-radius: 2px;
    transition: background .3s;
}
.ideas-connector-active { background: #F59E0B; }

/* Tooltip on each milestone — shown on hover */
.ideas-milestone[data-tooltip] { position: relative; cursor: default; }
.ideas-milestone[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #1F2937;
    color: #F9FAFB;
    font-size: .72rem;
    line-height: 1.4;
    padding: .4rem .65rem;
    border-radius: 6px;
    white-space: normal;
    width: 200px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
/* Small triangle pointer */
.ideas-milestone[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1F2937;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
    z-index: 10;
}
.ideas-milestone[data-tooltip]:hover::after,
.ideas-milestone[data-tooltip]:hover::before { opacity: 1; }

/* Rejected state */
.ideas-block-rejected {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    border-color: #FECACA;
}
.ideas-badge-rejected {
    background: #EF4444;
    margin-left: .5rem;
}
.ideas-rejected-note {
    font-size: .85rem;
    color: #6B7280;
    line-height: 1.55;
    margin: .5rem 0 .75rem;
    padding: .65rem .9rem;
    background: rgba(255,255,255,.6);
    border-left: 3px solid #EF4444;
    border-radius: 0 4px 4px 0;
}

/* Links */
.ideas-links { display: flex; gap: .75rem; margin-top: .75rem; flex-wrap: wrap; }
.ideas-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1rem;
    border-radius: var(--radius, 6px);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.ideas-link-project {
    background: #F59E0B;
    color: #fff;
}
.ideas-link-project:hover { background: #D97706; }

/* Related article card */
.ideas-related-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: .75rem;
    background: #fff;
    border: 1px solid #FDE68A;
    border-radius: var(--radius, 6px);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s;
}
.ideas-related-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.ideas-related-img {
    width: 80px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.ideas-related-body { flex: 1; min-width: 0; }
.ideas-related-label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: #F59E0B;
    margin-bottom: .15rem;
}
.ideas-related-title {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: var(--color-text, #222);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .ideas-block { padding: 1rem; }
    /* 4 milestones — shrink dots and labels further so they all fit */
    .ideas-milestone-dot { width: 30px; height: 30px; font-size: .85rem; }
    .ideas-milestone span { font-size: .62rem; max-width: 52px; }
    .ideas-connector { min-width: 12px; max-width: 40px; }
    /* Tooltip: anchor to viewport on mobile so it doesn't clip */
    .ideas-milestone[data-tooltip]::after { width: 160px; font-size: .68rem; }
    .ideas-related-img { width: 60px; height: 40px; }
}

/* ═══ Card: Review Rating Overlay ═══════════════ */
.card-image { position: relative; }
.card-rating {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, .78);
    color: #FFD700;
    font-size: 1rem;
    font-weight: 700;
    padding: .3rem .6rem;
    border-radius: 6px;
    line-height: 1;
    backdrop-filter: blur(4px);
    z-index: 2;
}
.card-rating small {
    font-size: .65rem;
    font-weight: 400;
    color: rgba(255, 255, 255, .7);
    margin-left: 1px;
}

/* ═══ Card: Editorial Badge ═════════════════════ */
.card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: 4px;
    line-height: 1.3;
    letter-spacing: .01em;
    text-transform: uppercase;
    z-index: 2;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

/* ═══ Article: Badge Ribbon ═════════════════════ */
.article-badge-ribbon {
    display: inline-block;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    padding: .35rem .85rem;
    border-radius: 6px;
    margin-bottom: .75rem;
    letter-spacing: .02em;
}

@media (max-width: 600px) {
    .card-rating { font-size: .85rem; padding: .25rem .5rem; }
    .card-badge { font-size: .6rem; max-width: 110px; }
}

/* ═══ Article: Key Takeaways (AI Summary) ═══════ */
.article-takeaways {
    background: linear-gradient(135deg, #F0F4FF 0%, #E8EEFF 100%);
    border: 1px solid #C7D2FE;
    border-radius: var(--radius, 8px);
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0 1.5rem;
}
.takeaways-header {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .75rem;
}
.takeaways-icon {
    font-size: 1rem;
    color: #4050B5;
    line-height: 1;
}
.takeaways-label {
    font-size: .78rem;
    font-weight: 700;
    color: #4050B5;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.takeaways-body {
    font-size: .9rem;
    line-height: 1.65;
    color: var(--color-text, #333);
}
.takeaways-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.takeaways-body ul li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: .5rem;
}
.takeaways-body ul li:last-child { margin-bottom: 0; }
.takeaways-body ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 0;
    color: #4050B5;
    font-size: .7rem;
    line-height: 1.65rem;
}

/* Card excerpt AI indicator */
.excerpt-ai-icon {
    color: #4050B5;
    font-size: .65rem;
    vertical-align: middle;
    margin-right: .1rem;
}

@media (max-width: 600px) {
    .article-takeaways { padding: 1rem 1.15rem; }
    .takeaways-body { font-size: .85rem; }
}

/* ═══ Author Page ═══════════════════════════════ */
.author-page-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border, #e0e0e0);
}
.author-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.author-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4050B5;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}
.author-info { display: flex; flex-direction: column; gap: .25rem; }
.author-name { font-size: 1.6rem; font-weight: 700; margin: 0; line-height: 1.2; }
.author-role {
    font-size: .78rem;
    font-weight: 600;
    color: #4050B5;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.author-stats { font-size: .82rem; color: var(--color-text-2, #666); }

/* Author link in meta */
.meta-author a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}
.meta-author a:hover { color: #4050B5; text-decoration: underline; }

@media (max-width: 600px) {
    .author-page-header { gap: 1rem; }
    .author-avatar-lg { width: 60px; height: 60px; font-size: 1.5rem; }
    .author-name { font-size: 1.3rem; }
}

/* ═══ Admin: AI Draft from URL ══════════════════ */
.draft-url-page { max-width: 700px; }
.draft-url-header { margin-bottom: 1.5rem; }
.draft-url-header h2 { margin: 0 0 .5rem; }
.draft-url-desc { color: var(--color-text-2, #666); font-size: .9rem; line-height: 1.5; margin: 0; }
.draft-url-form { margin-bottom: 2rem; }
.draft-url-form .form-input-lg { font-size: 1rem; padding: .75rem 1rem; }
.btn-lg { padding: .7rem 1.5rem; font-size: .95rem; }

.draft-url-info { margin-top: 2rem; border-top: 1px solid var(--color-border, #e0e0e0); padding-top: 1.5rem; }
.draft-url-info h4 { margin: 0 0 1rem; font-size: .9rem; color: var(--color-text-2, #555); }
.draft-url-steps { display: flex; flex-direction: column; gap: .75rem; }
.draft-step {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}
.draft-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #4050B5;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    flex-shrink: 0;
}
.draft-step strong { display: block; font-size: .85rem; margin-bottom: .15rem; }
.draft-step p { margin: 0; font-size: .8rem; color: var(--color-text-2, #666); }

/* AI Draft Notice in article editor */
.ai-draft-notice {
    background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
    border: 1px solid #C4B5FD;
    border-radius: var(--radius, 8px);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.ai-draft-notice-header {
    font-size: .85rem;
    font-weight: 700;
    color: #5B21B6;
    margin-bottom: .5rem;
}
.ai-draft-notice p {
    font-size: .82rem;
    color: #4C1D95;
    margin: .35rem 0;
    line-height: 1.5;
}
.ai-draft-notice a { color: #5B21B6; font-weight: 500; }
.ai-draft-notice small { color: #6D28D9; }

@media (max-width: 600px) {
    .draft-url-page { max-width: 100%; }
    .draft-url-steps { gap: .5rem; }
}

/* ═══ Batch AI Drafting ═════════════════════════ */
.url-input-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
}
.url-row-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-bg, #f0f0f0);
    color: var(--color-text-2, #666);
    font-size: .72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.url-input-row .form-input { flex: 1; }

/* Progress list */
.batch-summary {
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text, #333);
}
.batch-progress-list { display: flex; flex-direction: column; gap: .5rem; }
.batch-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem 1rem;
    background: var(--color-bg-card, #fff);
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--radius, 6px);
}
.batch-item-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-bg, #f0f0f0);
    color: var(--color-text-2, #666);
    font-size: .72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.batch-item-body { flex: 1; min-width: 0; }
.batch-item-url {
    font-size: .78rem;
    color: var(--color-text-3, #999);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: .25rem;
}
.batch-item-status { font-size: .85rem; line-height: 1.4; }
.batch-status-pending { color: var(--color-text-3, #999); }
.batch-status-active { color: #4050B5; }
.batch-status-success { color: #16A34A; }
.batch-status-failed { color: #DC2626; }
.batch-item-actions { flex-shrink: 0; margin-top: 2px; }

/* Done box */
.batch-done-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    border: 1px solid #A7F3D0;
    border-radius: var(--radius, 8px);
}
.batch-done-icon { font-size: 1.8rem; }
.batch-done-box strong { display: block; font-size: .95rem; margin-bottom: .2rem; }
.batch-done-box p { margin: 0; font-size: .82rem; color: var(--color-text-2, #555); }

.text-danger { color: #DC2626; font-weight: 600; }

@media (max-width: 600px) {
    .batch-item { padding: .6rem .75rem; gap: .5rem; }
    .batch-item-url { font-size: .72rem; }
}

/* ═══ Admin: Sortable Table Columns ═════════════ */
.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.data-table th.sortable:hover { color: #4050B5; }
.sort-icon {
    display: inline-block;
    font-size: .72rem;
    margin-left: .3rem;
    opacity: .4;
    vertical-align: middle;
    line-height: 1;
}
.data-table th.sort-asc .sort-icon,
.data-table th.sort-desc .sort-icon { opacity: 1; color: #4050B5; }

/* ═══ Frontend: Deals Hub ═══════════════════════ */
.deals-page { max-width: 1200px; margin: 0 auto; padding: 0 1rem 3rem; }

/* Hero */
.deals-hero { text-align: center; padding: 2rem 0 1.5rem; }
.deals-hero-title { font-size: 2rem; margin: 0 0 .25rem; }
.deals-hero-sub { color: var(--color-text-2, #666); font-size: 1rem; margin: 0; }

/* Brand filter bar */
.deals-brand-bar {
    display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center;
    margin-bottom: 1.25rem; padding: .75rem 0;
}
.deals-brand-chip {
    display: flex; align-items: center; gap: .4rem;
    padding: .45rem 1rem; border-radius: 100px;
    background: var(--color-bg-card, #fff); border: 2px solid var(--color-border, #ddd);
    font-size: .82rem; font-weight: 600; color: var(--color-text, #333);
    text-decoration: none; transition: all .15s;
}
.deals-brand-chip:hover { border-color: var(--chip-color, #4050B5); color: var(--chip-color, #4050B5); }
.deals-brand-chip.active { background: var(--chip-color, #4050B5); border-color: var(--chip-color, #4050B5); color: #fff; }
.deals-brand-chip.active .deals-brand-chip-count { background: rgba(255,255,255,.25); color: #fff; }
.deals-brand-chip-count {
    background: var(--color-bg, #f0f0f0); color: var(--color-text-3, #999);
    font-size: .68rem; padding: .1rem .45rem; border-radius: 100px; font-weight: 700;
}

/* Search/filter row */
.deals-filter-row {
    display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.deals-search-input {
    flex: 1; min-width: 200px; padding: .55rem .85rem; border: 1px solid var(--color-border, #ddd);
    border-radius: var(--radius, 6px); font-size: .88rem; background: var(--color-bg-card, #fff);
}
.deals-search-input:focus { outline: none; border-color: #4050B5; box-shadow: 0 0 0 3px rgba(64,80,181,.1); }
.deals-filter-select {
    padding: .55rem .6rem; border: 1px solid var(--color-border, #ddd);
    border-radius: var(--radius, 6px); font-size: .82rem; background: var(--color-bg-card, #fff);
}
.deals-search-btn {
    padding: .55rem 1.25rem; background: #4050B5; color: #fff; border: none;
    border-radius: var(--radius, 6px); font-weight: 600; font-size: .85rem; cursor: pointer;
}
.deals-search-btn:hover { background: #333FA0; }
.deals-clear-btn { font-size: .82rem; color: var(--color-text-3); text-decoration: none; }
.deals-clear-btn:hover { color: #DC2626; }

.deals-results-count { font-size: .82rem; color: var(--color-text-3); margin-bottom: 1rem; }

/* Deal cards grid */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.deal-card {
    background: var(--color-bg-card, #fff); border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--radius, 8px); overflow: hidden; display: flex; flex-direction: column;
    transition: box-shadow .2s, transform .15s;
}
.deal-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-2px); }
.deal-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }

.deal-card-image {
    position: relative; aspect-ratio: 1; background: #f9f9f9;
    display: flex; align-items: center; justify-content: center; padding: .75rem; overflow: hidden;
}
.deal-card-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.deal-card-noimg { font-size: 3rem; opacity: .3; }

.deal-badge-score {
    position: absolute; top: 8px; left: 8px; color: #fff;
    font-size: .6rem; font-weight: 700; padding: .2rem .5rem; border-radius: 4px; line-height: 1.3;
}
.deal-badge-discount {
    position: absolute; top: 8px; right: 8px; background: #DC2626; color: #fff;
    font-size: .82rem; font-weight: 800; padding: .2rem .55rem; border-radius: 4px;
}

.deal-card-body { padding: .75rem .85rem .5rem; flex: 1; }
.deal-card-brand {
    display: inline-block; font-size: .6rem; font-weight: 700; letter-spacing: .06em;
    color: #4050B5; text-transform: uppercase; margin-bottom: .2rem;
}
.deal-card-title {
    font-size: .85rem; font-weight: 600; margin: .15rem 0 .4rem; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.deal-card-prices { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.deal-card-current { font-size: 1.1rem; font-weight: 800; color: #DC2626; }
.deal-card-original { font-size: .8rem; color: var(--color-text-3); text-decoration: line-through; }
.deal-card-retail { font-size: .95rem; font-weight: 600; color: var(--color-text); }
.deal-card-noprice { font-size: .78rem; color: var(--color-text-3); font-style: italic; }

.deal-card-buy {
    display: block; text-align: center; padding: .55rem; margin: 0 .75rem .75rem;
    background: #FF9900; color: #111; font-size: .78rem; font-weight: 700;
    border-radius: var(--radius, 6px); text-decoration: none; transition: background .15s;
}
.deal-card-buy:hover { background: #E88B00; }

/* Pagination */
.deals-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 2rem 0; }
.deals-page-btn { padding: .45rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius); text-decoration: none; color: var(--color-text); font-size: .85rem; }
.deals-page-btn:hover { border-color: #4050B5; color: #4050B5; }
.deals-page-info { font-size: .85rem; color: var(--color-text-3); }

.deals-empty { text-align: center; padding: 3rem 1rem; color: var(--color-text-3); }

/* CTAs */
.deals-cta-strip {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
    margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-border, #e0e0e0);
}
.deals-cta-card { text-align: center; padding: 2rem 1.5rem; background: var(--color-bg, #f5f5f5); border-radius: var(--radius, 8px); }
.deals-cta-icon { font-size: 2rem; margin-bottom: .75rem; }
.deals-cta-card h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
.deals-cta-card p { font-size: .85rem; color: var(--color-text-2); margin: 0 0 1rem; line-height: 1.5; }

.deals-affiliate-note { font-size: .7rem; color: var(--color-text-3); text-align: center; margin-top: 2rem; }

/* Deal detail */
.deals-breadcrumb { margin-bottom: 1.5rem; }
.deals-breadcrumb a { font-size: .85rem; color: var(--color-text-2); text-decoration: none; }
.deals-breadcrumb a:hover { color: #4050B5; }

.deal-detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-bottom: 2rem; }

.deal-detail-gallery { }
.deal-detail-main-img { background: #f9f9f9; border-radius: var(--radius, 8px); padding: 1.5rem; text-align: center; min-height: 300px; display: flex; align-items: center; justify-content: center; }
.deal-detail-main-img img { max-width: 100%; max-height: 400px; object-fit: contain; }
.deal-detail-thumbs { display: flex; gap: .5rem; margin-top: .75rem; overflow-x: auto; }
.deal-thumb { width: 60px; height: 60px; object-fit: contain; border: 2px solid transparent; border-radius: 4px; cursor: pointer; background: #f8f8f8; padding: 4px; }
.deal-thumb.active { border-color: #4050B5; }

.deal-detail-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.deal-detail-setnum { font-size: .78rem; color: var(--color-text-3); }
.deal-detail-pieces { font-size: .72rem; color: var(--color-text-3); }
.deal-detail-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 .75rem; line-height: 1.3; }

.deal-detail-score {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .4rem .85rem; border-radius: 6px;
    background: color-mix(in srgb, var(--score-color) 10%, transparent);
    border: 1px solid var(--score-color); color: var(--score-color);
    font-size: .82rem; font-weight: 700; margin-bottom: 1rem;
}

.deal-detail-pricing { margin-bottom: 1rem; }
.deal-detail-price-big { font-size: 2rem; font-weight: 800; color: #DC2626; }
.deal-detail-price-compare { display: flex; align-items: baseline; gap: .5rem; margin-top: .2rem; }
.deal-detail-was { font-size: 1.05rem; color: var(--color-text-3); text-decoration: line-through; }
.deal-detail-pct { font-size: 1.05rem; font-weight: 800; color: #DC2626; }
.deal-detail-avg { font-size: .82rem; color: var(--color-text-2); margin-top: .25rem; }

.deal-detail-verdict {
    background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: var(--radius, 6px);
    padding: .75rem 1rem; font-size: .88rem; line-height: 1.5; color: #166534; margin-bottom: 1.25rem;
}
.deal-detail-buy-btn {
    display: block; width: 100%; text-align: center; padding: .85rem;
    background: #FF9900; color: #111; font-size: 1.05rem; font-weight: 700;
    border-radius: var(--radius, 6px); text-decoration: none; transition: background .15s;
}
.deal-detail-buy-btn:hover { background: #E88B00; }
.deal-detail-note { font-size: .7rem; color: var(--color-text-3); margin-top: .4rem; text-align: center; }
.deal-detail-desc { margin-top: 1.5rem; }

.deal-chart-section { margin-top: 2rem; }
.deal-chart-section h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.deal-chart-wrap { height: 280px; }

@media (max-width: 768px) {
    .deal-detail-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .deals-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
    .deals-cta-strip { grid-template-columns: 1fr; }
    .deal-detail-price-big { font-size: 1.6rem; }
    .deals-hero-title { font-size: 1.5rem; }
    .deals-brand-bar { gap: .35rem; }
    .deals-brand-chip { padding: .35rem .7rem; font-size: .75rem; }
}
@media (max-width: 480px) {
    .deals-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
    .deal-card-title { font-size: .78rem; }
    .deal-card-body { padding: .5rem .6rem .4rem; }
    .deal-card-buy { margin: 0 .5rem .5rem; padding: .4rem; font-size: .72rem; }
}

/* ═══ Deal Watch Button ═════════════════════════ */
.deal-card-actions { display: flex; align-items: center; gap: .35rem; padding: 0 .75rem .75rem; }
.deal-watch-btn {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--color-border, #ddd);
    background: var(--color-bg-card, #fff); cursor: pointer; font-size: .9rem;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s; flex-shrink: 0;
}
.deal-watch-btn:hover { border-color: #4050B5; background: #F0F0FF; }
.deal-watch-btn.watching { border-color: #F59E0B; background: #FFFBEB; }
.deal-card-actions .deal-card-buy { flex: 1; margin: 0; }

/* Detail page watch button */
.deal-detail-watch-btn {
    display: block; width: 100%; text-align: center; padding: .7rem;
    background: var(--color-bg-card, #fff); border: 2px solid var(--color-border, #ddd);
    border-radius: var(--radius, 6px); font-size: .88rem; font-weight: 600;
    cursor: pointer; transition: all .15s; margin-top: .5rem; color: var(--color-text);
}
.deal-detail-watch-btn:hover { border-color: #4050B5; background: #F0F0FF; }
.deal-detail-watch-btn.watching { border-color: #F59E0B; background: #FFFBEB; color: #92400E; }

/* ═══ Watchlist in Account ══════════════════════ */
.watchlist-items { display: flex; flex-direction: column; gap: .5rem; }
.watchlist-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem; border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--radius, 6px); background: var(--color-bg-card, #fff);
}
.watchlist-item-img { width: 56px; height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.watchlist-item-img img { width: 100%; height: 100%; object-fit: contain; }
.watchlist-item-body { flex: 1; min-width: 0; }
.watchlist-item-title { display: block; font-weight: 600; font-size: .88rem; color: var(--color-text); text-decoration: none; line-height: 1.3; margin-bottom: .25rem; }
.watchlist-item-title:hover { color: #4050B5; }
.watchlist-item-prices { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; font-size: .85rem; }
.watchlist-item-actions { flex-shrink: 0; display: flex; gap: .35rem; align-items: center; }

@media (max-width: 600px) {
    .watchlist-item { flex-wrap: wrap; gap: .5rem; }
    .watchlist-item-actions { width: 100%; justify-content: flex-end; }
}

/* ═══ Article Quick Edit Button (staff only) ═══ */
.article-quick-edit {
    display: inline-flex; align-items: center; gap: .3rem;
    margin-left: .75rem; padding: .2rem .6rem;
    font: 500 .75rem/1 var(--font-body); color: var(--color-text-3);
    text-decoration: none; border: 1px solid var(--color-border);
    border-radius: 100px; transition: all .15s;
}
.article-quick-edit:hover {
    color: var(--color-primary); border-color: var(--color-primary);
    background: rgba(64,80,181,.04);
}
.article-quick-edit i { font-size: .85rem; }

/* ═══ Soft Gate ═════════════════════════════════════ */
.softgate-backdrop {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.35); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s;
}
.softgate-backdrop.open { opacity: 1; }
.softgate-backdrop[hidden] { display: none; }

.softgate-panel {
    position: relative; background: #fff; border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,.18);
    width: 100%; max-width: 380px; padding: 2rem;
    transform: translateY(12px); transition: transform .2s;
    outline: none;
}
.softgate-backdrop.open .softgate-panel { transform: translateY(0); }

.softgate-close {
    position: absolute; top: .75rem; right: .75rem;
    background: none; border: none; cursor: pointer;
    color: var(--color-text-3); font-size: 1.2rem;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: all .15s;
}
.softgate-close:hover { background: var(--color-border); color: var(--color-text); }

.softgate-view[hidden] { display: none; }

.softgate-heading {
    font: 700 1.25rem/1.2 var(--font-display); color: var(--color-text);
    margin: 0 0 .5rem; padding-right: 2rem;
}
.softgate-body {
    font-size: .88rem; line-height: 1.5; color: var(--color-text-2);
    margin: 0 0 1.25rem;
}

.softgate-primary {
    display: block; width: 100%; text-align: center;
    padding: .7rem; font-size: .9rem; font-weight: 600;
    border-radius: 10px; margin-bottom: .5rem;
}
.softgate-secondary {
    display: block; width: 100%; text-align: center;
    padding: .6rem; font-size: .85rem;
    border-radius: 10px; margin-bottom: .75rem;
}
.softgate-dismiss {
    display: block; width: 100%; text-align: center;
    background: none; border: none; cursor: pointer;
    font: 400 .8rem/1 var(--font-body); color: var(--color-text-3);
    padding: .4rem; transition: color .15s;
}
.softgate-dismiss:hover { color: var(--color-text); }

/* Form views */
.softgate-field { margin-bottom: .65rem; }
.softgate-field .form-input {
    width: 100%; padding: .6rem .75rem; border-radius: 8px;
    font-size: .88rem; box-sizing: border-box;
}
.softgate-submit {
    width: 100%; padding: .65rem; font-size: .9rem; font-weight: 600;
    border-radius: 10px; margin-top: .25rem; margin-bottom: .5rem;
}
.softgate-error {
    background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA;
    border-radius: 8px; padding: .5rem .75rem; font-size: .82rem;
    margin-bottom: .75rem;
}
.softgate-error[hidden] { display: none; }
.softgate-back {
    display: inline-flex; align-items: center; gap: .3rem;
    background: none; border: none; cursor: pointer;
    font: 400 .8rem/1 var(--font-body); color: var(--color-text-3);
    padding: .3rem 0; transition: color .15s;
}
.softgate-back:hover { color: var(--color-primary); }
.softgate-forgot {
    float: right; font-size: .78rem; color: var(--color-text-3);
    text-decoration: none; margin-top: -.1rem;
}
.softgate-forgot:hover { color: var(--color-primary); }
.softgate-legal {
    font-size: .72rem; color: var(--color-text-3); line-height: 1.4;
    margin-top: .5rem;
}
.softgate-legal a { color: var(--color-text-2); }

/* Mobile: bottom sheet */
@media (max-width: 600px) {
    .softgate-backdrop { align-items: flex-end; }
    .softgate-panel {
        max-width: none; border-radius: 16px 16px 0 0;
        padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0));
        transform: translateY(100%);
    }
    .softgate-backdrop.open .softgate-panel { transform: translateY(0); }
}

/* ═══ Soft Gate — Email Confirmation ════════════════ */
.softgate-confirm { text-align: center; }
.softgate-confirm-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.softgate-confirm .softgate-heading { padding-right: 0; }
.softgate-confirm .softgate-body { text-align: left; }
.softgate-confirm-note {
    font-size: .78rem; color: var(--color-text-3);
    margin: 1rem 0 1.25rem; line-height: 1.4;
}
