/* ── ValueHub Styles ────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1e3a5f;
    --primary-light: #2d5a8e;
    --accent: #0d9488;
    --accent-light: #0d9488;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --card-bg: #ffffff;
    --card-hover: #f1f5f9;
    --text: #0f172a;
    --text-muted: #334155;
    --text-dim: #64748b;
    --border: #e2e8f0;
    --gradient: linear-gradient(135deg, #1e3a5f, #0d9488);
    --gradient-light: linear-gradient(135deg, #2d5a8e, #14b8a6);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Breadcrumbs ───────────────────────────────────────────── */

.breadcrumbs {
    padding-top: 1rem;
    padding-bottom: 0;
}

.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs li {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 0;
}

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    color: var(--text-dim);
    opacity: 0.5;
}

.breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs li[aria-current="page"] {
    color: var(--text-muted);
    font-weight: 500;
}

/* Compact breadcrumbs on mobile — fewer lines, smaller text */
@media (max-width: 640px) {
    .breadcrumbs {
        padding-top: 0.5rem;
        padding-bottom: 0;
    }
    .breadcrumbs li {
        font-size: 0.75rem;
    }
    .breadcrumbs ol {
        gap: 0.3rem;
    }
}

/* ── Navigation ─────────────────────────────────────────────── */

.site-nav {
    background: var(--gradient);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* ── Featured images (CLS prevention) ──────────────────────── */

.featured-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 2rem 0;
}

/* ── Share Bar ────────────────────────────────────────────── */

.share-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s, transform 0.1s;
    line-height: 1;
    white-space: nowrap;
}
.share-btn:hover {
    filter: brightness(0.88);
    transform: translateY(-1px);
    color: #fff;
}
.share-btn:active {
    transform: translateY(0);
}
.share-btn svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.share-btn.facebook  { background: #1877f2; }
.share-btn.twitter   { background: #0f1419; }
.share-btn.linkedin  { background: #0a66c2; }
.share-btn.reddit    { background: #ff4500; }
.share-btn.email     { background: #6b7280; }
.share-btn.copylink  { background: #0d9488; }

.share-btn.copylink.copied {
    background: #059669;
}

.article-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.article-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-logo:hover {
    color: #fff;
}

.nav-logo-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

.nav-links > li > a {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-links > li > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 0.5rem;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ── Search ────────────────────────────────────────────────── */

.search-form {
    display: flex;
    align-items: center;
}

.site-nav .search-form input[type="search"] {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    width: 160px;
    transition: all 0.2s;
}

.site-nav .search-form input[type="search"]:focus {
    outline: none;
    border-color: #fff;
    width: 200px;
}

.site-nav .search-form input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-form-large input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius);
}

.search-form-large {
    display: flex;
    gap: 0.5rem;
}

.search-results-summary {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.search-result-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.25rem;
}

.search-result-item h3 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.search-result-item h3 a {
    color: var(--accent);
}

.search-result-item h3 a:hover {
    color: var(--primary);
}

.search-result-item p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

.pill-sm {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links.open {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        display: block;
        background: transparent;
    }
}

/* ── Hero Section ────────────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 5rem 0 4rem;
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.hero .tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.18rem;
    }
    .hero {
        padding: 3rem 0 2rem;
    }
}

/* ── Hero Welcome / Value Props ────────────────────────────────── */

.hero-welcome {
    max-width: 960px;
    margin: 0 auto;
}

.hero-welcome-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.value-props-row {
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-bottom: 2.5rem;
    text-align: left;
}

.value-props {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.value-props-logo {
    flex-shrink: 0;
}

.vp-logo-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
}

.value-prop {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.vp-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--accent);
}

.vp-text strong {
    color: var(--text);
}

/* ── Team Quote ────────────────────────────────────────────────── */

.team-quote {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--accent);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.75rem 2rem 1.75rem 2.5rem;
    text-align: left;
    margin-top: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.disclaimer-box {
    background: var(--alt-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.disclaimer-box strong {
    color: var(--primary);
    font-weight: 600;
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: none;
}

.team-quote-body {
    flex: 1;
    min-width: 0;
}

.team-quote .quote-mark {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--accent);
    opacity: 0.15;
    width: 28px;
    height: 28px;
}

.team-quote .quote-mark-open {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    color: var(--accent);
    opacity: 0.15;
    width: 28px;
    height: 28px;
    transform: rotate(180deg);
}

.team-quote blockquote {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.75rem;
}

.team-quote cite {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    font-style: normal;
    display: block;
}

@media (max-width: 768px) {
    .value-props-row {
        flex-direction: column;
        gap: 2rem;
    }
    .vp-logo-img {
        width: 150px;
        height: 150px;
    }
}

/* On mobile, move the logo above the bullet points */
@media (max-width: 640px) {
    .value-props-row {
        flex-direction: column-reverse;
        align-items: center;
    }
    .value-props-logo {
        margin-bottom: 0.5rem;
    }
    .hero-welcome-intro {
        font-size: 1rem;
    }
    .value-prop {
        font-size: 0.95rem;
    }
    .team-quote {
        padding: 1.25rem 1rem;
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    .team-quote .quote-mark {
        display: none;
    }
    .team-avatar {
        width: 160px;
        height: 160px;
    }
    .team-quote-body {
        text-align: center;
    }
}

/* ── Buttons ─────────────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--card-hover);
    color: var(--primary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* ── Cards ───────────────────────────────────────────────────── */

.card {
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.2s;
}

.card:hover {
    background: var(--card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Grid Layouts ────────────────────────────────────────────── */

.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ── Section Backgrounds ─────────────────────────────────────── */

.section-alt {
    background: var(--bg-alt);
}

/* ── Flash Messages ──────────────────────────────────────────── */

.flash-messages {
    padding: 1rem 0;
}

.flash-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.flash-success {
    background: rgba(13, 148, 136, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
}

.flash-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #dc2626;
}

/* ── Footer ──────────────────────────────────────────────────── */

.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 4rem 0 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(5, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul a {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-col ul a:hover {
    color: var(--accent);
}

.footer-disclaimer {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-disclaimer p {
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.footer-bottom {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ── Footer Bottom Gradient Section ────────────────────────────── */

.footer-bottom-gradient {
    background: var(--gradient);
    padding: 2.5rem 0 2rem;
    margin-top: 2rem;
}

.footer-bottom-gradient .footer-disclaimer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-bottom-gradient .footer-disclaimer p {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.footer-bottom-gradient .footer-bottom {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}
.footer-social-link:hover { color: var(--accent); }
.footer-social-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Pill / Badge ────────────────────────────────────────────── */

.pill {
    display: inline-block;
    background: rgba(13, 148, 136, 0.1);
    border: 1px solid rgba(13, 148, 136, 0.25);
    color: var(--accent);
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Trader / Category Cards ─────────────────────────────────── */

.trade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.trade-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius);
    transition: all 0.2s;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

.trade-card:hover {
    background: var(--card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.trade-card .trade-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ── Articles List ───────────────────────────────────────────── */

.article-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.article-item-content {
    flex: 1;
}

.article-item-image {
    width: 160px;
    height: 120px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    align-self: center;
}

.article-item:hover {
    background: var(--card-hover);
    border-color: var(--accent);
}

.article-item-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.article-item h3 {
    margin-bottom: 0.5rem;
}

.article-item h3 a {
    color: var(--primary);
}

.article-item h3 a:hover {
    color: var(--accent);
}

.article-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .article-item {
        flex-direction: column;
    }
}

/* ── Page Content ────────────────────────────────────────────── */

.page-content {
    padding: 3rem 0;
}

.page-content h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.page-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 2rem 0 1rem;
}

.page-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin: 1.5rem 0 0.75rem;
}

.page-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.page-content ul, .page-content ol {
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

.page-content .pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.page-content .pros-box {
    background: rgba(13, 148, 136, 0.06);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.page-content .cons-box {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.page-content .pros-box h3 { color: var(--accent); }
.page-content .cons-box h3 { color: #dc2626; }

@media (max-width: 640px) {
    .page-content .pros-cons {
        grid-template-columns: 1fr;
    }
}

/* ── Star Rating ─────────────────────────────────────────────── */

.stars {
    display: inline-flex;
    gap: 2px;
}

.star {
    color: var(--border);
    font-size: 1.25rem;
}

.star.filled {
    color: #f59e0b;
}

/* ── Calculator ──────────────────────────────────────────────── */

.calculator-form {
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.calculator-results {
    background: var(--bg-alt);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem 0;
    display: none;
}

.calculator-results.show {
    display: block;
}

.result-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.result-label {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ── Calculator Cards ──────────────────────────────────────── */

.calculator-card {
    text-align: center;
    padding: 2rem 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
}

.calculator-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.calculator-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.calculator-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.calculator-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* ── Table ───────────────────────────────────────────────────── */

.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table th {
    background: var(--bg-alt);
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

table tr:hover td {
    background: var(--bg-alt);
}

/* ── Admin Panel ─────────────────────────────────────────────── */

.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--primary);
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem;
}

.admin-sidebar h2 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 1.5rem;
}

.admin-sidebar nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.admin-sidebar nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.admin-content {
    padding: 2rem;
    background: var(--bg);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

/* Admin tables */
.admin-table {
    width: 100%;
}

.admin-table .actions {
    display: flex;
    gap: 0.5rem;
}

.admin-table .actions a,
.admin-table .actions button {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit {
    background: rgba(13, 148, 136, 0.1);
    color: var(--accent);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.btn-edit:hover { background: var(--accent); color: #fff; }
.btn-delete:hover { background: #ef4444; color: #fff; }

/* Admin sortable table headers */
.sort-header {
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.sort-header:hover {
    color: var(--accent);
    text-decoration: underline;
}
.sort-arrow {
    font-size: 0.65rem;
    margin-left: 0.25rem;
    vertical-align: middle;
}

/* Admin toolbar (search + result count) */
.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.admin-search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-search-input {
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    min-width: 260px;
    outline: none;
    transition: border-color 0.2s;
}
.admin-search-input:focus {
    border-color: var(--accent);
}
.admin-result-count {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin: 0;
}

/* Admin forms */
.admin-form {
    max-width: 900px;
}

.admin-form textarea {
    min-height: 300px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

/* Larger textarea for article body preview — bigger font, full width */
.admin-form textarea#body {
    min-height: 500px;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 100%;
    width: 100%;
}

.admin-form textarea#body:focus {
    border-color: var(--accent);
}

/* ── Admin Mobile Responsive ───────────────────────────────────── */

.admin-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-right: 0.5rem;
    background: none;
    border: none;
    line-height: 1;
}

.admin-menu-btn:hover {
    background: var(--bg-alt);
}

.admin-sidebar-close {
    display: none;
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 1.75rem;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
}

.admin-sidebar-close:hover {
    color: #fff;
}

.admin-overlay {
    display: none;
}

@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-menu-btn {
        display: inline-block;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        height: 100vh;
        z-index: 200;
        transition: left 0.25s ease;
        overflow-y: auto;
    }

    .admin-sidebar.open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    }

    .admin-sidebar-close {
        display: block;
    }

    .admin-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 199;
    }

    .admin-overlay.open {
        display: block;
    }

    .admin-content {
        padding: 1rem;
    }

    .admin-header h1 {
        font-size: 1.25rem;
    }
}

/* ── Simple Pages ────────────────────────────────────────────── */

.simple-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 0;
}

.simple-page h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.simple-page p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .simple-page {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ── Client Portal ───────────────────────────────────────────── */

.client-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .client-stats {
        grid-template-columns: 1fr;
    }
}

/* ── Login Page ──────────────────────────────────────────────── */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem;
    background: var(--bg-alt);
}

.login-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.login-box .btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* ── Error Pages ─────────────────────────────────────────────── */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
    text-align: center;
}

.error-page h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.error-page p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* ── Coming Soon Overlay ─────────────────────────────────────── */

.coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 2rem;
}

.coming-soon h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.coming-soon p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto;
}

/* ── Calculator Callout (article pages) ────────────────────────── */

.calculator-callout {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
}

.calculator-callout h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.calculator-callout > p {
    color: var(--text-dim);
    margin-bottom: 0;
}

.calculator-callout .card {
    text-decoration: none;
}

.calculator-callout .card:hover {
    border-color: var(--accent);
}

/* ── Form Card (for admin forms) ─────────────────────────────── */

.form-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 600px;
}

.form-card .btn {
    margin-right: 0.5rem;
}


/* ── Rate Comparison Pages ──────────────────────────────────── */

.rate-page {
    padding: 2rem 0 4rem;
}

.rate-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.rate-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.rate-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto;
}

.rate-updated {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

.rate-disclaimer {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #92400e;
}

.rate-disclaimer a {
    color: #92400e;
    text-decoration: underline;
}

.rate-table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    -webkit-overflow-scrolling: touch;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 700px;
}

.rate-table thead {
    background: var(--primary);
    color: #fff;
}

.rate-table thead th {
    padding: 0.75rem 0.625rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.rate-table thead th.col-institution {
    text-align: left;
    min-width: 140px;
}

.rate-table thead th.col-product {
    text-align: left;
    min-width: 100px;
}

.rate-table thead th.col-rate {
    min-width: 75px;
}

.rate-table thead th.col-rating {
    text-align: center;
    min-width: 55px;
}

.rate-table thead th.col-min {
    text-align: center;
    min-width: 65px;
    font-size: 0.75rem;
}

.rate-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.rate-table tbody tr:hover {
    background: var(--card-hover);
}

.rate-table tbody tr.main-rate-row {
    background: #fafcff;
}

.rate-table tbody td {
    padding: 0.625rem;
    text-align: center;
    vertical-align: middle;
}

.rate-table tbody td.col-institution {
    text-align: left;
    font-weight: 500;
}

.rate-table tbody td.col-product {
    text-align: left;
    font-size: 0.8rem;
}

.rate-table tbody td.col-rating {
    text-align: center;
}

.rate-table tbody td.col-min {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.rate-value {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.2s;
}

.rate-value.lowest-rate {
    background: #ccfbf1;
    color: #0f766e;
}

.rate-value.highest-rate {
    background: #ccfbf1;
    color: #0f766e;
}

.rate-na {
    color: var(--border);
    font-size: 0.85rem;
}

.rate-empty {
    text-align: center;
    padding: 3rem 1rem !important;
    color: var(--text-dim);
}

.product-badge {
    display: inline-block;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.rating-badge {
    display: inline-block;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    letter-spacing: 0.02em;
}

/* Rate feature cards */
.rate-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .rate-features {
        grid-template-columns: 1fr;
    }
}

.rate-feature-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.rate-feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.rate-feature-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rate-feature-card li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.rate-feature-card li::before {
    content: "•";
    position: absolute;
    left: 0.35rem;
    color: var(--accent);
    font-weight: 700;
}

.text-accent {
    color: var(--accent);
    font-weight: 600;
}

/* Related tools section */
.rate-related {
    text-align: center;
    padding: 2rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
}

.rate-related h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.rate-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

/* Homepage rate CTA buttons */
.rate-cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    max-width: 960px;
    margin: 0 auto;
}

@media (max-width: 860px) {
    .rate-cta-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .rate-cta-row {
        grid-template-columns: 1fr;
    }
}

.rate-cta-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
}

.rate-cta-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    text-decoration: none;
}

.rate-cta-card:hover .rate-cta-arrow {
    transform: translateX(4px);
    color: var(--accent);
}

.rate-cta-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 10px;
}

.rate-cta-icon svg {
    width: 100%;
    height: 100%;
}

.rate-cta-text {
    flex: 1;
}

.rate-cta-text h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.15rem;
    white-space: nowrap;
}

.rate-cta-text p {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin: 0;
}

.rate-cta-arrow {
    font-size: 1.5rem;
    color: var(--text-dim);
    transition: transform 0.25s, color 0.25s;
    flex-shrink: 0;
}


/* ── Rate Type Badges (Bond page) ──────────────────────────── */

.rate-type-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rate-type-badge.ocr {
    background: #dbeafe;
    color: #1e40af;
}

.rate-type-badge.swap {
    background: #e0f2fe;
    color: #0369a1;
}

.rate-type-badge.bond {
    background: #ecfdf5;
    color: #047857;
}

.rate-type-badge.bill {
    background: #fef3c7;
    color: #92400e;
}

.change-up {
    color: #059669;
}

.change-down {
    color: #dc2626;
}


/* ── Responsive: Rate table on small screens ──────────────── */

@media (max-width: 768px) {
    .rate-header h1 {
        font-size: 1.5rem;
    }

    .rate-table {
        font-size: 0.8rem;
        min-width: 600px;
    }

    .rate-table thead th {
        font-size: 0.7rem;
        padding: 0.5rem 0.35rem;
    }

    .rate-table tbody td {
        padding: 0.4rem 0.35rem;
    }

    .rate-value {
        font-size: 0.8rem;
    }

    .rate-cta-card {
        padding: 1rem;
    }

    .rate-cta-icon {
        width: 40px;
        height: 40px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .rate-cta-card {
        padding: 0.75rem;
        gap: 0.75rem;
        min-width: 0;
    }

    .rate-cta-text {
        min-width: 0;
    }

    .rate-cta-card h3 {
        font-size: 0.95rem;
    }

    .rate-cta-card p {
        font-size: 0.8rem;
        line-height: 1.3;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .rate-cta-icon {
        width: 36px;
        height: 36px;
    }

    .rate-cta-arrow {
        display: none;
    }
}


/* ── Bond Page Specific ────────────────────────────────────── */

.rate-filter-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.rate-search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.rate-search-input:focus {
    border-color: var(--accent);
}

.rate-filter-select {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--bg);
    outline: none;
    cursor: pointer;
}

.rate-filter-select:focus {
    border-color: var(--accent);
}

.bond-count {
    font-size: 0.85rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.wholesale-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    background: #fef3c7;
    color: #92400e;
    vertical-align: middle;
    margin-left: 3px;
    text-transform: uppercase;
}

.wholesale-row {
    opacity: 0.75;
}

.col-code { min-width: 70px; }
.col-issuer { min-width: 160px; }
.col-description { min-width: 220px; }
.col-coupon { min-width: 65px; text-align: center; white-space: nowrap; }
.col-maturity { min-width: 95px; white-space: nowrap; }
.col-yield { min-width: 80px; text-align: center; white-space: nowrap; }
.col-change { min-width: 65px; text-align: center; white-space: nowrap; }
.col-volume { min-width: 80px; text-align: right; white-space: nowrap; }
.col-outstanding { min-width: 100px; text-align: right; white-space: nowrap; }

@media (max-width: 768px) {
    .rate-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .rate-search-input {
        min-width: auto;
    }
    .bond-count {
        text-align: center;
    }
    .wholesale-row {
        opacity: 1;
    }
}
