/* =========================================================
   TENEXCH - DARK THEME, HIGHLIGHTS AND LICENSE SECTION
   Loaded after the main stylesheet. Overrides the shared
   colour tokens so every page picks up the dark look.
========================================================= */

:root {
    color-scheme: dark;

    --tx-gold: #f2c56b;
    --tx-gold-soft: rgba(242, 197, 107, .14);
    --tx-line: #2a2d3a;
    --tx-panel: #14161d;
    --tx-panel-2: #1b1d25;

    --background: #0b0c10;
    --foreground: #f3f4f8;
    --card: #14161d;
    --card-foreground: #f3f4f8;
    --popover: #14161d;
    --popover-foreground: #f3f4f8;
    --primary: #f2c56b;
    --primary-foreground: #14161d;
    --secondary: #1d2029;
    --secondary-foreground: #f3f4f8;
    --muted: #171922;
    --muted-foreground: #a7aab8;
    --border: #2a2d3a;
    --input: #2a2d3a;
    --ink: #0d0e12;
    --ink-foreground: #ffffff;
    --gradient-ink: linear-gradient(135deg, #171a23, #08090c);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 34px -20px rgba(0, 0, 0, .8);
    --shadow-lift: 0 18px 40px -20px rgba(0, 0, 0, .9);
}

::selection {
    background: rgba(242, 197, 107, .35);
    color: #fff;
}

/* ---------- page background ---------- */

.min-h-screen.bg-background {
    background-image:
        radial-gradient(900px 420px at 50% -80px, rgba(242, 197, 107, .09), transparent 70%),
        radial-gradient(700px 380px at 100% 40%, rgba(135, 87, 255, .05), transparent 70%);
    background-repeat: no-repeat;
}

.stripe-pattern {
    background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 12px);
}

/* ---------- form fields and fixed colours ---------- */

input,
textarea,
select {
    color: var(--foreground);
}

input::placeholder,
textarea::placeholder {
    color: #6f7384;
}

[style*="color:#000"] {
    color: var(--foreground) !important;
}

details.border-b {
    border-color: var(--border);
}

/* buttons that use the dark "ink" colour need an edge on a dark page */

.bg-ink {
    border: 1px solid rgba(255, 255, 255, .16);
}

.brand-bar .bg-ink {
    border-color: transparent;
}

/* ---------- highlights ---------- */

main strong,
main b {
    color: var(--tx-gold);
    font-weight: 700;
    background-image: linear-gradient(transparent 62%, rgba(242, 197, 107, .2) 0);
    padding: 0 .12em;
    border-radius: 2px;
}

.hl {
    color: var(--tx-gold);
    font-weight: 700;
    background-image: linear-gradient(transparent 60%, rgba(242, 197, 107, .22) 0);
    padding: 0 .15em;
    border-radius: 2px;
}

main section .mx-auto > h2:first-child,
main article > h2 {
    border-left: 4px solid var(--tx-gold);
    padding-left: .75rem;
}

main section .mx-auto > h2:first-child .block {
    display: inline;
}

main .surface-card,
main .rounded-xl.border {
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

main article.surface-card:hover,
main .rounded-xl.border:hover {
    border-color: rgba(242, 197, 107, .45);
    box-shadow: 0 0 0 1px rgba(242, 197, 107, .12), 0 18px 36px -22px rgba(242, 197, 107, .35);
}

main details summary:hover {
    color: var(--tx-gold);
}

main details[open] > summary {
    color: var(--tx-gold);
}

/* ---------- homepage blocks that carried their own light colours ---------- */

body .upi-section {
    background: #080b12 !important;
}

body .upi-container h2 {
    color: #ffffff !important;
}

body .upi-subtitle,
body .upi-footer {
    color: #a5a9b8 !important;
}

body .upi-card {
    background: #151a25 !important;
    border-color: #343047 !important;
}

body .upi-card span {
    color: #ffffff !important;
}

body .upi-card:hover {
    border-color: var(--tx-gold) !important;
    box-shadow: 0 8px 25px rgba(242, 197, 107, .16) !important;
}

/* ---------- blog pages ---------- */

body .tenexch-blog-content {
    color: #c9ccd8 !important;
}

body .tenexch-blog-content h1,
body .tenexch-blog-content h2,
body .tenexch-blog-content h4,
body .tenexch-blog-content h5,
body .tenexch-blog-content h6 {
    color: #ffffff !important;
}

body .tenexch-blog-content h3 {
    color: var(--tx-gold) !important;
}

body .tenexch-blog-content p,
body .tenexch-blog-content i,
body .tenexch-blog-content ol,
body .tenexch-blog-content ul,
body .tenexch-blog-content li {
    color: #b7bacb !important;
}

body .tenexch-blog-content b,
body .tenexch-blog-content strong {
    color: #ffffff !important;
}

body .tenexch-blog-content a {
    color: var(--tx-gold) !important;
}

body .tenexch-blog-content a:hover {
    color: #ffffff !important;
}

body .tenexch-blog-content li::marker {
    color: var(--tx-gold);
}

body .tenexch-blog-content blockquote {
    background: var(--tx-panel-2);
    border-left-color: var(--tx-gold);
    color: #b7bacb !important;
}

body .tenexch-blog-content code {
    background: #1d2029;
    color: var(--tx-gold) !important;
}

body .tenexch-blog-content pre {
    border: 1px solid var(--tx-line);
}

body .tenexch-blog-content img,
body .tenexch-detail-image-wrap {
    border-color: var(--tx-line);
    background: var(--tx-panel);
}

body .tenexch-blog-content figcaption {
    color: #8b8fa3 !important;
}

body .tenexch-blog-content td {
    border-color: var(--tx-line);
    color: #c9ccd8 !important;
}

body .tenexch-blog-content th {
    border-color: var(--tx-line);
    background: #1d2029;
    color: var(--tx-gold) !important;
}

body .tenexch-blog-content hr {
    border-top-color: var(--tx-line);
}

body .tenexch-blog-card {
    background: var(--tx-panel);
    border-color: var(--tx-line);
}

body .tenexch-blog-card:hover {
    border-color: rgba(242, 197, 107, .45);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
}

body .tenexch-blog-meta {
    color: #8b8fa3;
}

body .tenexch-blog-title,
body .tenexch-blog-title a {
    color: #ffffff !important;
}

body .tenexch-blog-title a:hover {
    color: var(--tx-gold) !important;
}

body .tenexch-blog-excerpt {
    color: #a7aab8 !important;
}

body .tenexch-blog-read {
    color: var(--tx-gold) !important;
}

body .tenexch-blog-read:hover {
    color: #ffffff !important;
}

body .tenexch-blog-article {
    background: var(--tx-panel) !important;
    color: #c9ccd8 !important;
    border-color: var(--tx-line);
}

/* =========================================================
   LICENSE SECTION
========================================================= */

.tx-lic {
    background: #0e1016;
    border-top: 1px solid var(--tx-line);
    border-bottom: 1px solid var(--tx-line);
    padding: 56px 20px;
    color: #ffffff;
    scroll-margin-top: 70px;
}

.tx-lic-wrap {
    max-width: 1000px;
    margin: 0 auto;
}

.tx-lic-head {
    text-align: center;
    margin-bottom: 34px;
}

.tx-lic-eyebrow {
    display: inline-block;
    color: var(--tx-gold);
    letter-spacing: 3px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.tx-lic-head h2 {
    margin: 12px 0 10px;
    font-size: 34px;
    line-height: 1.1;
    text-transform: uppercase;
    font-weight: 900;
    color: #ffffff;
}

.tx-lic-head p {
    max-width: 680px;
    margin: 0 auto;
    color: #b9bac3;
    line-height: 1.8;
    font-size: 15px;
}

.tx-lic-block {
    background: var(--tx-panel-2);
    border: 1px solid #343640;
    border-radius: 14px;
    padding: 24px;
    margin-top: 20px;
}

.tx-lic-block > .tx-lic-label {
    display: block;
    color: var(--tx-gold);
    font-size: 12px;
    letter-spacing: .14em;
    font-weight: 800;
    text-transform: uppercase;
}

.tx-lic-block h3 {
    margin: 8px 0 12px;
    font-size: 20px;
    line-height: 1.3;
    color: #ffffff;
}

.tx-lic-block p {
    color: #c3c4cc;
    line-height: 1.8;
    font-size: 14.5px;
    margin: 0;
}

.tx-lic-block p + p {
    margin-top: 10px;
}

.tx-lic-short {
    border-left: 4px solid var(--tx-gold);
}

.tx-lic-table-wrap {
    margin-top: 14px;
    overflow-x: auto;
    border: 1px solid #343640;
    border-radius: 10px;
}

.tx-lic-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
    font-size: 14px;
}

.tx-lic-table th,
.tx-lic-table td {
    text-align: left;
    padding: 13px 16px;
    border-bottom: 1px solid #2a2d3a;
    vertical-align: top;
    line-height: 1.6;
}

.tx-lic-table thead th {
    background: #20232d;
    color: var(--tx-gold);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tx-lic-table tbody th {
    color: #ffffff;
    font-weight: 700;
    white-space: nowrap;
}

.tx-lic-table td {
    color: #c3c4cc;
}

.tx-lic-table tbody tr:last-child th,
.tx-lic-table tbody tr:last-child td {
    border-bottom: 0;
}

.tx-lic-table td:last-child {
    background: rgba(242, 197, 107, .05);
    color: #ffffff;
}

.tx-lic-steps {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    counter-reset: txstep;
    display: grid;
    gap: 12px;
}

.tx-lic-steps li {
    counter-increment: txstep;
    position: relative;
    padding: 14px 16px 14px 56px;
    background: #14161d;
    border: 1px solid #2a2d3a;
    border-radius: 10px;
    color: #c3c4cc;
    line-height: 1.7;
    font-size: 14.5px;
}

.tx-lic-steps li::before {
    content: counter(txstep);
    position: absolute;
    left: 14px;
    top: 13px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--tx-gold);
    color: #14161d;
    font-weight: 900;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tx-lic-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.tx-lic-links a {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 6px;
    border: 1px solid var(--tx-gold);
    color: var(--tx-gold);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: background .2s ease, color .2s ease;
}

.tx-lic-links a:hover {
    background: var(--tx-gold);
    color: #14161d;
}

.tx-lic-note {
    margin-top: 16px !important;
    font-size: 13px !important;
    color: #a7aab8 !important;
}

@media (max-width: 600px) {
    .tx-lic {
        padding: 42px 16px;
    }

    .tx-lic-head h2 {
        font-size: 27px;
    }

    .tx-lic-block {
        padding: 18px;
    }
}
