/*
 * XpressLabs Operator Ghost Theme v0.1.0
 * Dark infrastructure-console theme inspired by the supplied XpressLabs mockup.
 */

:root {
    color-scheme: dark;
    --tx-bg: #03090f;
    --tx-bg-2: #06111a;
    --tx-panel: rgba(9, 20, 30, 0.86);
    --tx-panel-strong: rgba(11, 26, 38, 0.96);
    --tx-panel-soft: rgba(11, 27, 40, 0.62);
    --tx-border: rgba(109, 145, 170, 0.23);
    --tx-border-strong: rgba(0, 174, 255, 0.46);
    --tx-text: #e8f0f7;
    --tx-muted: #9baabc;
    --tx-dim: #687789;
    --tx-cyan: #00aeff;
    --tx-cyan-2: #13d8ff;
    --tx-green: #1edd6b;
    --tx-amber: #ffb000;
    --tx-red: #ff5353;
    --tx-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --tx-glow: 0 0 34px rgba(0, 174, 255, 0.22);
    --tx-radius: 12px;
    --tx-radius-lg: 18px;
    --tx-page: min(1320px, calc(100vw - 64px));
    --tx-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --tx-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--tx-bg);
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--tx-text);
    background:
        radial-gradient(circle at 28% -5%, rgba(0, 174, 255, 0.18), transparent 31rem),
        radial-gradient(circle at 88% 16%, rgba(0, 174, 255, 0.09), transparent 34rem),
        linear-gradient(180deg, #02070c 0%, #07111a 54%, #03080e 100%);
    font-family: var(--tx-sans);
    line-height: 1.55;
    overflow-x: hidden;
}

body::before,
body::after {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    content: "";
}

body::before {
    background-image:
        linear-gradient(rgba(126, 180, 216, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(126, 180, 216, 0.035) 1px, transparent 1px);
    background-size: 82px 82px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.4) 72%, transparent 100%);
}

body::after {
    z-index: -1;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 4px),
        radial-gradient(circle at 68% 50%, transparent 0 22rem, rgba(0, 0, 0, 0.18) 45rem);
    opacity: 0.44;
    mix-blend-mode: screen;
}

::selection {
    color: #00121c;
    background: var(--tx-cyan-2);
}

a {
    color: var(--tx-cyan);
    text-decoration: none;
}

a:hover {
    color: var(--tx-cyan-2);
}

button,
input,
textarea {
    font: inherit;
}

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

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tx-site-shell {
    position: relative;
    min-height: 100vh;
    border-left: 1px solid rgba(121, 159, 187, 0.18);
    border-right: 1px solid rgba(121, 159, 187, 0.18);
}

.tx-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    height: 76px;
    padding: 0 max(24px, calc((100vw - var(--tx-page)) / 2));
    border-bottom: 1px solid var(--tx-border);
    background: rgba(3, 9, 15, 0.8);
    backdrop-filter: blur(18px);
}

.tx-brand,
.tx-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--tx-text);
    font-weight: 800;
}

.tx-logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--tx-cyan);
}

.tx-logo-mark svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 13px rgba(0, 174, 255, 0.35));
}

.tx-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.tx-brand-parent {
    color: #dbe7f1;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.tx-brand-title {
    margin-top: 3px;
    font-size: 24px;
    letter-spacing: -0.04em;
}

.tx-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 2.4vw, 30px);
}

.tx-nav a {
    color: #dce6ee;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.tx-nav a:hover {
    color: var(--tx-cyan-2);
}

.tx-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.tx-icon-button,
.tx-footer button {
    display: inline-grid;
    place-items: center;
    padding: 0;
    color: var(--tx-text);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.tx-icon-button svg {
    width: 22px;
    height: 22px;
}

.tx-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    color: #eefaff;
    font-family: var(--tx-mono);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(180deg, #12b9ff 0%, #047ce6 100%);
    border: 1px solid rgba(62, 196, 255, 0.86);
    border-radius: 6px;
    box-shadow: var(--tx-glow), inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tx-button:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 0 42px rgba(0, 174, 255, 0.33), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.tx-button-small {
    min-height: 36px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 5px;
}

.tx-button-ghost {
    color: #d6e8f5;
    background: rgba(14, 31, 45, 0.72);
    border-color: var(--tx-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tx-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 18px;
    color: var(--tx-muted);
    font-family: var(--tx-mono);
    font-size: 13px;
    white-space: nowrap;
    border-left: 1px solid rgba(121, 159, 187, 0.16);
}

.tx-status span,
.tx-footer-status i {
    width: 8px;
    height: 8px;
    background: var(--tx-green);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(30, 221, 107, 0.55);
}

.tx-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--tx-border);
    border-radius: 8px;
}

.tx-menu-toggle span:not(.screen-reader-text) {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--tx-text);
    border-radius: 999px;
}

.tx-command-strip,
.tx-hero,
.tx-pillars,
.tx-featured,
.tx-list-page,
.tx-post-page,
.tx-error-page {
    width: var(--tx-page);
    margin-inline: auto;
}

.tx-command-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 46px;
    padding: 0 0;
    color: var(--tx-muted);
    font-family: var(--tx-mono);
    font-size: 12px;
    border-bottom: 1px solid rgba(121, 159, 187, 0.16);
}

.tx-command-icon {
    display: inline-grid;
    place-items: center;
    width: 27px;
    height: 27px;
    color: var(--tx-muted);
    background: rgba(9, 20, 30, 0.8);
    border: 1px solid rgba(121, 159, 187, 0.16);
    border-radius: 6px;
}

.tx-command-strip strong {
    margin-left: auto;
    color: var(--tx-amber);
    text-transform: uppercase;
}

.tx-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(460px, 520px);
    gap: clamp(36px, 8vw, 110px);
    align-items: center;
    min-height: 400px;
    padding: 44px 0 34px;
    border-bottom: 1px solid var(--tx-border);
}

.tx-hero::after {
    position: absolute;
    top: 0;
    right: -14px;
    width: 125px;
    height: 100%;
    opacity: 0.26;
    background:
        linear-gradient(90deg, transparent 0 18px, rgba(121, 159, 187, 0.22) 18px 20px, transparent 20px 56px, rgba(121, 159, 187, 0.12) 56px 58px, transparent 58px),
        linear-gradient(rgba(121, 159, 187, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(121, 159, 187, 0.12) 1px, transparent 1px);
    background-size: 80px 100%, 20px 20px, 20px 20px;
    content: "FIG. 2 — STACK";
    color: var(--tx-muted);
    font-family: var(--tx-mono);
    font-size: 10px;
    text-align: right;
}

.tx-kicker,
.tx-section-head h2 {
    color: var(--tx-cyan-2);
    font-family: var(--tx-mono);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.tx-hero h1,
.tx-page-header h1,
.tx-article-header h1,
.tx-error-card h1 {
    margin: 14px 0 14px;
    color: #f4f8fc;
    font-family: var(--tx-mono);
    font-size: clamp(44px, 5.2vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.075em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 35px rgba(220, 240, 255, 0.08);
}

.tx-hero h1 span {
    color: var(--tx-cyan);
}

.tx-hero p,
.tx-page-header p,
.tx-article-header p,
.tx-error-card p,
.tx-subscribe-cta p {
    max-width: 650px;
    color: var(--tx-muted);
    font-family: var(--tx-mono);
    font-size: 16px;
}

.tx-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.tx-proofline {
    margin-top: 20px;
    color: var(--tx-muted);
    font-family: var(--tx-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.tx-proofline span {
    color: var(--tx-dim);
    padding-inline: 6px;
}

.tx-ecosystem-panel {
    position: relative;
    padding: 22px;
    background: linear-gradient(180deg, rgba(9, 20, 30, 0.96), rgba(6, 15, 23, 0.82));
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    box-shadow: var(--tx-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tx-ecosystem-panel h2 {
    margin: 0 0 14px;
    color: #1c9dff;
    font-family: var(--tx-mono);
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tx-ecosystem-list {
    position: relative;
    display: grid;
    gap: 10px;
}

.tx-ecosystem-list::before {
    position: absolute;
    left: 22px;
    top: 28px;
    bottom: 28px;
    width: 1px;
    background: linear-gradient(var(--tx-border), rgba(0, 174, 255, 0.34), var(--tx-border));
    content: "";
}

.tx-eco-row {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 16px;
    min-height: 60px;
    padding: 9px 10px 9px 0;
    color: var(--tx-text);
    background: rgba(3, 10, 17, 0.36);
    border: 1px dashed rgba(121, 159, 187, 0.15);
    border-radius: 9px;
}

.tx-eco-row:hover,
.tx-eco-row.active {
    border-color: rgba(0, 174, 255, 0.45);
    background: rgba(0, 174, 255, 0.06);
}

.tx-eco-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: -1px;
    color: var(--tx-cyan);
    font-family: var(--tx-mono);
    font-size: 20px;
    background: rgba(17, 34, 47, 0.96);
    border: 1px solid var(--tx-border);
    border-radius: 8px;
}

.tx-eco-row strong,
.tx-eco-row em {
    display: block;
    font-family: var(--tx-mono);
}

.tx-eco-row strong {
    color: var(--tx-cyan);
    font-size: 15px;
}

.tx-eco-row em {
    color: var(--tx-muted);
    font-size: 12px;
    font-style: normal;
}

.tx-eco-row b {
    padding: 4px 7px;
    color: var(--tx-amber);
    font-family: var(--tx-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid currentColor;
    border-radius: 6px;
}

.tx-eco-row.active b {
    color: var(--tx-cyan-2);
}

.tx-eco-row:nth-child(3) b {
    color: var(--tx-green);
}

.tx-eco-row:nth-child(4) b {
    color: var(--tx-muted);
}

.tx-pillars,
.tx-featured {
    padding: 20px 0 22px;
}

.tx-section-head {
    margin-bottom: 12px;
}

.tx-section-head h2 {
    margin: 0;
}

.tx-section-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tx-section-head-row a {
    color: var(--tx-cyan-2);
    font-family: var(--tx-mono);
    font-size: 12px;
    font-weight: 900;
}

.tx-pillar-grid,
.tx-post-grid {
    display: grid;
    gap: 16px;
}

.tx-pillar-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tx-post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tx-card {
    position: relative;
    overflow: hidden;
    color: var(--tx-text);
    background: linear-gradient(180deg, rgba(11, 24, 36, 0.86), rgba(5, 14, 22, 0.86));
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.tx-card::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 5%, rgba(0, 174, 255, 0.11), transparent 11rem),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 30%);
    opacity: 0;
    transition: opacity 160ms ease;
    content: "";
}

.tx-card:hover {
    border-color: rgba(0, 174, 255, 0.42);
}

.tx-card:hover::before {
    opacity: 1;
}

.tx-card > * {
    position: relative;
    z-index: 1;
}

.tx-pillar {
    display: grid;
    gap: 14px;
    min-height: 146px;
    padding: 20px 18px 18px;
}

.tx-pillar span {
    color: var(--tx-cyan);
    font-family: var(--tx-mono);
    font-size: 28px;
    line-height: 1;
}

.tx-pillar strong {
    color: #edf5fb;
    font-size: 16px;
    letter-spacing: -0.03em;
}

.tx-pillar em {
    color: var(--tx-muted);
    font-family: var(--tx-mono);
    font-size: 13px;
    font-style: normal;
    line-height: 1.45;
}

.tx-post-card {
    display: flex;
    flex-direction: column;
    min-height: 168px;
    padding: 18px;
}

.tx-card-topline,
.tx-article-meta,
.tx-post-meta,
.tx-article-byline,
.tx-share-line,
.tx-tag-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tx-card-topline {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
}

.tx-card-topline time,
.tx-article-meta,
.tx-post-meta,
.tx-article-byline,
.tx-share-line {
    color: var(--tx-muted);
    font-family: var(--tx-mono);
    font-size: 12px;
}

.tx-badge {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 2px 7px;
    color: var(--tx-cyan);
    font-family: var(--tx-mono);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(0, 174, 255, 0.09);
    border: 1px solid rgba(0, 174, 255, 0.42);
    border-radius: 5px;
}

.tag-incidents .tx-badge {
    color: var(--tx-red);
    background: rgba(255, 83, 83, 0.09);
    border-color: rgba(255, 83, 83, 0.46);
}

.tag-runbooks .tx-badge {
    color: #63baff;
}

.tag-signals .tx-badge {
    color: #48e7ff;
}

.tag-lab .tx-badge {
    color: #d1a3ff;
}

.tx-post-card h2 {
    margin: 0 0 8px;
    font-family: var(--tx-mono);
    font-size: clamp(18px, 1.5vw, 21px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.tx-post-card h2 a {
    color: #f2f6fb;
}

.tx-post-card h2 a:hover {
    color: var(--tx-cyan-2);
}

.tx-post-card p {
    margin: 0 0 18px;
    color: var(--tx-muted);
    font-family: var(--tx-mono);
    font-size: 13px;
    line-height: 1.5;
}

.tx-post-meta {
    margin-top: auto;
}

.tx-separator {
    color: rgba(121, 159, 187, 0.22);
}

.tx-footer {
    margin-top: 20px;
    border-top: 1px solid var(--tx-border);
    background: rgba(3, 9, 15, 0.7);
}

.tx-footer-status,
.tx-footer-main {
    width: var(--tx-page);
    margin-inline: auto;
}

.tx-footer-status {
    display: grid;
    grid-template-columns: repeat(9, auto);
    align-items: center;
    gap: 24px;
    min-height: 46px;
    color: var(--tx-muted);
    font-family: var(--tx-mono);
    font-size: 12px;
}

.tx-footer-status > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tx-footer-nominal {
    margin-left: auto;
    color: #c4d3df;
}

.tx-footer-nominal b {
    display: inline-block;
    width: 28px;
    height: 15px;
    margin-left: 12px;
    background: linear-gradient(90deg, transparent 0 25%, var(--tx-cyan) 25% 33%, transparent 33% 48%, var(--tx-cyan) 48% 56%, transparent 56% 100%);
    clip-path: polygon(0 55%, 28% 55%, 38% 15%, 48% 90%, 61% 35%, 70% 55%, 100% 55%, 100% 70%, 69% 70%, 61% 52%, 48% 100%, 37% 43%, 30% 70%, 0 70%);
}

.tx-footer-main {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 70px;
    gap: 22px;
    border-top: 1px solid rgba(121, 159, 187, 0.11);
}

.tx-footer-brand {
    color: rgba(232, 240, 247, 0.58);
    font-size: 18px;
}

.tx-footer-main nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.tx-footer-main nav a,
.tx-footer-main nav button,
.tx-footer-main p {
    color: var(--tx-muted);
    font-family: var(--tx-mono);
    font-size: 12px;
}

.tx-footer-main p {
    justify-self: end;
    margin: 0;
}

.tx-list-page,
.tx-post-page,
.tx-error-page {
    padding: 54px 0 10px;
}

.tx-page-header {
    max-width: 860px;
    margin-bottom: 28px;
}

.tx-page-header h1 {
    font-size: clamp(38px, 4.8vw, 64px);
}

.tx-author-header img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 1px solid var(--tx-border);
    border-radius: 999px;
}

.tx-post-grid-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tx-pagination {
    display: flex;
    justify-content: center;
    margin: 34px 0;
    color: var(--tx-muted);
    font-family: var(--tx-mono);
}

.tx-pagination .pagination {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tx-pagination a {
    padding: 8px 12px;
    border: 1px solid var(--tx-border);
    border-radius: 7px;
}

.tx-article {
    max-width: 920px;
    margin: 0 auto;
}

.tx-article-header {
    margin-bottom: 32px;
}

.tx-article-header h1 {
    max-width: 1060px;
    font-size: clamp(40px, 6vw, 76px);
}

.tx-article-header p {
    max-width: 780px;
    font-size: 17px;
}

.tx-article-byline img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 999px;
}

.tx-feature-image {
    width: min(1080px, 100%);
    margin: 28px auto 36px;
}

.tx-feature-image img {
    width: 100%;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    box-shadow: var(--tx-shadow);
}

.tx-feature-image figcaption {
    margin-top: 8px;
    color: var(--tx-dim);
    font-family: var(--tx-mono);
    font-size: 12px;
    text-align: center;
}

.tx-reading-progress {
    position: sticky;
    top: 76px;
    z-index: 20;
    height: 2px;
    margin-bottom: 24px;
    background: rgba(121, 159, 187, 0.12);
}

.tx-reading-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--tx-cyan), var(--tx-cyan-2));
    box-shadow: 0 0 18px rgba(0, 174, 255, 0.55);
}

.tx-content {
    color: #d8e3ec;
    font-size: 18px;
    line-height: 1.78;
}

.tx-content > * {
    margin-top: 0;
    margin-bottom: 1.35em;
}

.tx-content h2,
.tx-content h3,
.tx-content h4 {
    color: #f2f6fb;
    font-family: var(--tx-mono);
    line-height: 1.13;
    letter-spacing: -0.055em;
}

.tx-content h2 {
    margin-top: 2em;
    font-size: clamp(30px, 3.4vw, 44px);
}

.tx-content h3 {
    margin-top: 1.8em;
    font-size: clamp(24px, 2.4vw, 32px);
}

.tx-content h4 {
    font-size: 21px;
}

.tx-content p,
.tx-content li {
    color: #cbd7e1;
}

.tx-content strong {
    color: #f2f6fb;
}

.tx-content blockquote {
    margin: 1.8em 0;
    padding: 18px 22px;
    color: #eef7ff;
    font-family: var(--tx-mono);
    background: rgba(0, 174, 255, 0.07);
    border-left: 3px solid var(--tx-cyan);
    border-radius: 0 var(--tx-radius) var(--tx-radius) 0;
}

.tx-content pre {
    overflow-x: auto;
    padding: 20px;
    color: #dff7ff;
    background: #02070d;
    border: 1px solid rgba(0, 174, 255, 0.22);
    border-radius: var(--tx-radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.tx-content code {
    color: #dff7ff;
    font-family: var(--tx-mono);
    font-size: 0.9em;
    background: rgba(0, 174, 255, 0.08);
    border: 1px solid rgba(0, 174, 255, 0.16);
    border-radius: 5px;
    padding: 0.12em 0.32em;
}

.tx-content pre code {
    padding: 0;
    background: transparent;
    border: 0;
}

.tx-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-family: var(--tx-mono);
    font-size: 14px;
}

.tx-content th,
.tx-content td {
    padding: 10px 12px;
    border: 1px solid var(--tx-border);
}

.tx-content th {
    color: #f2f6fb;
    background: rgba(0, 174, 255, 0.07);
}

.tx-content hr {
    height: 1px;
    border: 0;
    background: var(--tx-border);
}

.tx-content .kg-card,
.tx-content .kg-image-card {
    margin: 2em 0;
}

.tx-content .kg-image,
.tx-content .kg-card img {
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
}

.tx-content .kg-width-wide {
    width: min(1120px, calc(100vw - 64px));
    margin-left: 50%;
    transform: translateX(-50%);
}

.tx-content .kg-width-full {
    width: min(1320px, calc(100vw - 32px));
    margin-left: 50%;
    transform: translateX(-50%);
}

.tx-content figcaption,
.tx-content .kg-card figcaption {
    margin-top: 8px;
    color: var(--tx-dim);
    font-family: var(--tx-mono);
    font-size: 12px;
    text-align: center;
}

.tx-content .kg-bookmark-card a.kg-bookmark-container {
    color: var(--tx-text);
    background: rgba(11, 24, 36, 0.8);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
}

.tx-content .kg-callout-card {
    border-radius: var(--tx-radius);
}

.tx-article-footer {
    display: grid;
    gap: 20px;
    margin-top: 44px;
    padding-top: 24px;
    border-top: 1px solid var(--tx-border);
}

.tx-tag-list a {
    display: inline-flex;
    padding: 6px 9px;
    color: var(--tx-cyan);
    font-family: var(--tx-mono);
    font-size: 12px;
    border: 1px solid rgba(0, 174, 255, 0.24);
    border-radius: 999px;
}

.tx-share-line {
    gap: 16px;
}

.tx-related {
    margin: 72px auto 0;
}

.tx-related h2,
.tx-subscribe-cta h2 {
    margin: 0 0 16px;
    color: #f2f6fb;
    font-family: var(--tx-mono);
    font-size: clamp(26px, 3.4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.055em;
}

.tx-subscribe-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 72px auto 0;
    padding: 28px;
    background: linear-gradient(135deg, rgba(0, 174, 255, 0.1), rgba(9, 20, 30, 0.92));
    border: 1px solid rgba(0, 174, 255, 0.28);
    border-radius: var(--tx-radius-lg);
    box-shadow: var(--tx-glow);
}

.tx-subscribe-cta h2 {
    max-width: 760px;
}

.tx-subscribe-cta p {
    margin-bottom: 0;
}

.tx-error-page {
    display: grid;
    place-items: center;
    min-height: 62vh;
}

.tx-error-card {
    max-width: 680px;
    padding: 36px;
}

.tx-error-card label {
    display: block;
    margin: 22px 0 8px;
    color: var(--tx-muted);
    font-family: var(--tx-mono);
    font-size: 13px;
}

.tx-error-card input {
    width: 100%;
    min-height: 44px;
    margin-bottom: 16px;
    padding: 0 14px;
    color: var(--tx-text);
    background: rgba(3, 10, 17, 0.8);
    border: 1px solid var(--tx-border);
    border-radius: 8px;
}

body.tx-search-open {
    overflow: hidden;
}

@media (max-width: 1180px) {
    :root {
        --tx-page: min(100% - 40px, 980px);
    }

    .tx-topbar {
        gap: 18px;
    }

    .tx-nav {
        gap: 14px;
    }

    .tx-status {
        display: none;
    }

    .tx-hero {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .tx-hero::after {
        display: none;
    }

    .tx-ecosystem-panel {
        max-width: 620px;
    }

    .tx-pillar-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    :root {
        --tx-page: min(100% - 30px, 760px);
    }

    .tx-topbar {
        grid-template-columns: auto auto;
        justify-content: space-between;
        height: 70px;
    }

    .tx-menu-toggle {
        display: block;
    }

    .tx-nav {
        position: absolute;
        top: 70px;
        left: 15px;
        right: 15px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        background: rgba(3, 9, 15, 0.96);
        border: 1px solid var(--tx-border);
        border-radius: var(--tx-radius);
        box-shadow: var(--tx-shadow);
    }

    .tx-nav.is-open {
        display: flex;
    }

    .tx-nav a {
        padding: 10px 6px;
    }

    .tx-actions {
        display: none;
    }

    .tx-command-strip {
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .tx-command-strip strong {
        width: 100%;
        margin-left: 41px;
    }

    .tx-post-grid,
    .tx-post-grid-list {
        grid-template-columns: 1fr 1fr;
    }

    .tx-footer-status {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 14px 0;
    }

    .tx-footer-nominal {
        margin-left: 0;
    }

    .tx-footer-main {
        grid-template-columns: 1fr;
        justify-items: start;
        padding: 20px 0;
    }

    .tx-footer-main nav {
        flex-wrap: wrap;
        gap: 16px;
    }

    .tx-footer-main p {
        justify-self: start;
    }

    .tx-subscribe-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    :root {
        --tx-page: min(100% - 24px, 540px);
    }

    .tx-brand-title {
        font-size: 21px;
    }

    .tx-brand-parent {
        font-size: 12px;
    }

    .tx-hero {
        padding-top: 34px;
    }

    .tx-hero h1,
    .tx-page-header h1,
    .tx-article-header h1 {
        letter-spacing: -0.065em;
    }

    .tx-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .tx-button {
        width: 100%;
    }

    .tx-eco-row {
        grid-template-columns: 42px 1fr;
    }

    .tx-eco-row b {
        grid-column: 2;
        justify-self: start;
    }

    .tx-pillar-grid,
    .tx-post-grid,
    .tx-post-grid-list {
        grid-template-columns: 1fr;
    }

    .tx-pillar {
        min-height: auto;
    }

    .tx-section-head-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .tx-content {
        font-size: 17px;
    }

    .tx-content .kg-width-wide,
    .tx-content .kg-width-full {
        width: calc(100vw - 24px);
    }

    .tx-reading-progress {
        top: 70px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* v0.1.2: route-safe homepage archive section */
.tx-all-articles {
    padding-top: 8px;
}

.tx-all-articles:target {
    scroll-margin-top: 96px;
}
