/* ============================================================
   BeCanada — shared styles for site chrome, new pages and
   article add-ons (header link, byline, sources).
   Loaded by every page. Keep it small: it is not critical CSS.
   ============================================================ */

/* ---------- 1. "Domain for sale" link in the header ---------- */
.domain-sale-link {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-light, #64748b);
    text-decoration: none;
    white-space: nowrap;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.domain-sale-link:hover,
.domain-sale-link:focus {
    opacity: 1;
    text-decoration: underline;
}

/* Article pages: brand on the left, domain link on the right */
.article-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Right-hand group in the article nav: sources jump + domain link */
.article-nav-side {
    display: flex;
    align-items: center;
    gap: 16px;
}

.article-nav-side .sources-jump {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light, #64748b);
    text-decoration: none;
    white-space: nowrap;
}

.article-nav-side .sources-jump:hover,
.article-nav-side .sources-jump:focus {
    text-decoration: underline;
}

/* Standalone thin bar, used where there is no other nav */
.site-bar {
    background: var(--navy, #0a1628);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 0;
}

.site-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-bar .domain-sale-link {
    color: #94a3b8;
}

.site-bar .site-bar-brand {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white, #fff);
    text-decoration: none;
}

.site-bar .site-bar-brand:hover {
    color: var(--accent, #2563eb);
}

/* ---------- 2. Byline ---------- */
.article-byline {
    margin-top: 6px;
    font-size: 0.9rem;
}

.article-header .article-byline {
    color: #cbd5e1;
}

.article-header .article-byline a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-header .article-byline a:hover {
    color: var(--accent, #2563eb);
}

/* ---------- 3. Sources section at the end of every article ---------- */
.article-sources {
    background: var(--gray-50, #f8fafc);
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    padding: 32px;
    margin: 48px 0 0;
    scroll-margin-top: 80px;
}

.article-sources h2 {
    font-size: 1.3rem !important;
    margin: 0 0 8px !important;
    padding: 0 0 12px !important;
    border-top: none !important;
    border-bottom: 2px solid var(--blue, #1a56db);
}

.article-sources > p {
    font-size: 0.9rem !important;
    color: var(--text-secondary, #475569);
}

.sources-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.86rem;
    background: #fff;
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
}

.sources-table th {
    background: var(--navy, #0a1628);
    color: var(--white, #fff);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
}

.sources-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--gray-100, #f1f5f9);
    color: var(--text-secondary, #475569);
    vertical-align: top;
}

.sources-table tr:last-child td {
    border-bottom: none;
}

.sources-table td:first-child {
    color: var(--text-primary, #0f172a);
    font-weight: 600;
}

.sources-table a {
    color: var(--blue, #1a56db);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.source-list {
    margin: 12px 0 20px 20px !important;
    font-size: 0.88rem;
}

.source-list li {
    margin-bottom: 8px;
    color: var(--text-secondary, #475569);
}

.source-note {
    font-size: 0.82rem !important;
    color: var(--text-light, #64748b);
    border-top: 1px solid var(--gray-200, #e2e8f0);
    padding-top: 16px;
    margin-top: 20px;
    margin-bottom: 0 !important;
}

/* ---------- 4. Static content pages (about / contact / policy / inquiry) ---------- */
.page-main {
    padding: 48px 0 64px;
}

.page-main .container {
    max-width: 760px;
}

.page-main h1 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy, #0a1628);
    margin-bottom: 12px;
}

.page-lede {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--text-secondary, #475569);
    margin-bottom: 36px;
}

.page-main h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy, #0a1628);
    margin: 40px 0 14px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200, #e2e8f0);
}

.page-main h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy, #0a1628);
    margin: 26px 0 10px;
}

.page-main p,
.page-main li {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary, #475569);
}

.page-main ul,
.page-main ol {
    margin: 12px 0 20px 22px;
}

.page-main li {
    margin-bottom: 8px;
}

.page-main a {
    color: var(--blue, #1a56db);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-updated {
    font-size: 0.82rem;
    color: var(--text-light, #64748b);
    border-top: 1px solid var(--gray-200, #e2e8f0);
    margin-top: 44px;
    padding-top: 20px;
}

/* Contact / inquiry detail rows */
.detail-list {
    list-style: none;
    margin: 20px 0 0 0 !important;
    padding: 0;
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
}

.detail-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--gray-100, #f1f5f9);
    font-size: 0.93rem;
}

.detail-list li:last-child {
    border-bottom: none;
}

.detail-list .detail-label {
    min-width: 150px;
    font-weight: 700;
    color: var(--navy, #0a1628);
}

/* Simple inquiry form */
.inquiry-form {
    background: #fff;
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    padding: 28px;
    margin: 24px 0;
}

.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy, #0a1628);
    margin-bottom: 6px;
}

.form-field .hint {
    font-weight: 400;
    color: var(--text-light, #64748b);
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    font: inherit;
    font-size: 0.92rem;
    padding: 11px 13px;
    color: var(--text-primary, #0f172a);
    background: #fff;
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field textarea {
    min-height: 130px;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--blue, #1a56db);
    box-shadow: 0 0 0 3px var(--accent-glow, rgba(37, 99, 235, 0.15));
}

.btn-submit {
    display: inline-block;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--white, #fff);
    background: var(--blue, #1a56db);
    border: none;
    border-radius: 8px;
    padding: 13px 30px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-submit:hover {
    background: var(--blue-hover, #1444b0);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

.form-alt {
    font-size: 0.88rem;
    color: var(--text-secondary, #475569);
    margin: 0;
}

@media (max-width: 640px) {
    .article-sources {
        padding: 24px 20px;
    }

    .sources-table {
        font-size: 0.8rem;
    }

    .sources-table th,
    .sources-table td {
        padding: 9px 8px;
    }

    .inquiry-form {
        padding: 22px 18px;
    }

    .detail-list .detail-label {
        min-width: 100%;
    }
}
