:root {
    color-scheme: light dark;
    --bg: #0d1017;
    --panel: #151a24;
    --panel-soft: #1c2330;
    --text: #eef2f6;
    --muted: #aab4c2;
    --line: #2d3545;
    --accent: #57c7b6;
    --accent-2: #f0c36a;
    --code: #071018;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(87, 199, 182, 0.10), transparent 340px),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

code,
pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.tx-header {
    display: grid;
    grid-template-columns: 112px minmax(0, 980px);
    gap: 28px;
    align-items: start;
    max-width: 1220px;
    margin: 0 auto;
    padding: 42px 24px 28px;
}

.tx-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.04);
}

.tx-kicker {
    color: var(--accent);
    margin: 0 0 8px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

h1,
h2,
h3 {
    line-height: 1.15;
    letter-spacing: 0;
}

h1 {
    margin: 0;
    font-size: clamp(2.15rem, 4vw, 4.5rem);
}

.tx-lede {
    max-width: 780px;
    color: var(--muted);
    font-size: 1.08rem;
    margin: 14px 0 0;
}

.tx-header-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}

.tx-header-links a {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
    padding: 8px 11px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.92rem;
}

.tx-header-links a:hover,
.tx-header-links a:focus {
    border-color: rgba(87, 199, 182, 0.72);
}

.tx-search {
    margin-top: 22px;
    max-width: 840px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(21, 26, 36, 0.86);
    padding: 16px;
}

.tx-search label {
    display: block;
    color: var(--text);
    font-weight: 850;
    margin-bottom: 8px;
}

.tx-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.tx-search input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #090f16;
    color: var(--text);
    padding: 0 12px;
    outline: none;
}

.tx-search input:focus {
    border-color: rgba(87, 199, 182, 0.82);
    box-shadow: 0 0 0 3px rgba(87, 199, 182, 0.18);
}

.tx-search button {
    min-height: 44px;
    border: 1px solid rgba(87, 199, 182, 0.7);
    border-radius: 8px;
    background: rgba(87, 199, 182, 0.16);
    color: var(--text);
    cursor: pointer;
    font-weight: 850;
    padding: 0 14px;
}

.tx-search button:hover,
.tx-search button:focus {
    background: rgba(87, 199, 182, 0.25);
}

.tx-search-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tx-search-prompts button {
    min-height: 34px;
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.045);
    color: var(--muted);
    font-size: 0.88rem;
    padding: 0 10px;
}

.tx-search-results {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.tx-search-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.tx-search-result {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 12px;
    text-decoration: none;
}

.tx-search-result:hover,
.tx-search-result:focus {
    border-color: rgba(87, 199, 182, 0.72);
    background: rgba(87, 199, 182, 0.08);
}

.tx-result-category {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tx-search-result small {
    color: var(--muted);
    font-size: 0.92rem;
}

mark {
    color: var(--text);
    background: rgba(240, 195, 106, 0.32);
    border-radius: 4px;
    padding: 0 2px;
}

.tx-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 980px);
    gap: 28px;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

.tx-toc {
    position: sticky;
    top: 18px;
    align-self: start;
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(21, 26, 36, 0.84);
}

.tx-toc a {
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
}

.tx-toc a:hover,
.tx-toc a:focus {
    color: var(--text);
    background: var(--panel-soft);
}

.tx-doc {
    display: grid;
    gap: 18px;
}

section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(21, 26, 36, 0.88);
    padding: 26px;
}

section:target {
    border-color: rgba(87, 199, 182, 0.72);
}

h2 {
    margin: 0 0 14px;
    font-size: 1.55rem;
}

h3 {
    margin: 18px 0 8px;
    color: var(--accent-2);
    font-size: 1rem;
}

p,
ul,
ol {
    margin-top: 0;
    color: var(--muted);
}

li + li {
    margin-top: 6px;
}

.tx-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tx-grid > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 16px;
}

.tx-grid h3 {
    margin-top: 0;
}

.tx-faq-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.tx-faq-tools a {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    padding: 12px;
    text-decoration: none;
}

.tx-faq-tools strong {
    display: block;
    color: var(--text);
    margin-bottom: 2px;
}

.tx-faq-category {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(21, 26, 36, 0.88);
    overflow: hidden;
}

.tx-faq-category + .tx-faq-category {
    margin-top: 14px;
}

.tx-faq-category > summary {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    color: var(--text);
    font-weight: 900;
    padding: 16px 18px;
    list-style: none;
}

.tx-faq-category > summary::-webkit-details-marker,
.tx-faq-item > summary::-webkit-details-marker {
    display: none;
}

.tx-faq-category > summary::after {
    content: "+";
    color: var(--accent);
    font-weight: 900;
}

.tx-faq-category[open] > summary::after {
    content: "-";
}

.tx-faq-list {
    display: grid;
    gap: 8px;
    padding: 0 14px 14px;
}

.tx-faq-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.tx-faq-item > summary {
    cursor: pointer;
    list-style: none;
    color: var(--text);
    font-weight: 800;
    padding: 13px 14px;
}

.tx-faq-item[open] > summary {
    border-bottom: 1px solid var(--line);
}

.tx-faq-item p,
.tx-faq-item ul {
    padding: 12px 14px 14px;
    margin: 0;
}

pre {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--code);
    color: #dbe7f3;
    padding: 16px;
}

code {
    color: #cfe8e4;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    padding: 0.08em 0.32em;
}

pre code {
    background: transparent;
    border: 0;
    padding: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    overflow: hidden;
    border-radius: 8px;
}

.tx-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.tx-log-table {
    min-width: 760px;
}

.tx-log-table th:first-child,
.tx-log-table td:first-child {
    width: 24%;
}

.tx-log-table:not(.tx-timeline-table) th:last-child,
.tx-log-table:not(.tx-timeline-table) td:last-child {
    width: 220px;
    white-space: nowrap;
}

[data-log-source] .tx-timeline-table th:last-child,
[data-log-source] .tx-timeline-table td:last-child {
    display: none;
}

.tx-work-notes {
    margin-top: 18px;
}

.tx-work-notes h3 {
    margin-bottom: 8px;
}

.tx-log-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 190px)) auto minmax(160px, 1fr);
    gap: 10px;
    align-items: end;
    margin: 12px 0 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.tx-log-filter label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
}

.tx-log-filter input {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #090f16;
    color: var(--text);
    padding: 0 10px;
}

.tx-log-filter button {
    min-height: 38px;
    border: 1px solid rgba(87, 199, 182, 0.7);
    border-radius: 8px;
    background: rgba(87, 199, 182, 0.14);
    color: var(--text);
    cursor: pointer;
    font-weight: 850;
    padding: 0 12px;
}

.tx-log-filter output {
    color: var(--muted);
    font-size: 0.9rem;
}

.tx-log-groups {
    display: grid;
    gap: 8px;
}

.tx-log-day {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    overflow: hidden;
}

.tx-log-day > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    color: var(--text);
    cursor: pointer;
    font-weight: 900;
    list-style: none;
    padding: 10px 14px;
}

.tx-log-day > summary::-webkit-details-marker {
    display: none;
}

.tx-log-day > summary::after {
    content: "+";
    color: var(--accent);
    font-weight: 900;
}

.tx-log-day[open] > summary::after {
    content: "-";
}

.tx-log-summary-date {
    min-width: 0;
}

.tx-log-summary-count {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.86rem;
    white-space: nowrap;
}

.tx-log-day-table {
    border-top: 1px solid var(--line);
}

.tx-log-day-table table {
    margin: 0;
}

.tx-timeline-table {
    min-width: 690px;
}

.tx-timeline-table th,
.tx-timeline-table td {
    padding: 8px 10px;
    font-size: 0.9rem;
}

.tx-timeline-table th:first-child,
.tx-timeline-table td:first-child {
    width: 22%;
}

.tx-timeline-table th:last-child,
.tx-timeline-table td:last-child {
    width: 132px;
    white-space: nowrap;
}

.tx-work-table th:nth-child(2),
.tx-work-table td:nth-child(2) {
    width: 160px;
}

.tx-work-table th:last-child,
.tx-work-table td:last-child {
    width: auto;
    white-space: normal;
}

.tx-work-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 0 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.tx-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tx-filter-buttons button {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--muted);
    cursor: pointer;
    font-weight: 850;
    padding: 0 11px;
}

.tx-filter-buttons button:hover,
.tx-filter-buttons button:focus,
.tx-filter-buttons button.is-active {
    border-color: rgba(87, 199, 182, 0.76);
    background: rgba(87, 199, 182, 0.16);
    color: var(--text);
}

.tx-work-filter output {
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.tx-feature-link {
    display: inline;
    width: auto;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    padding: 0;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: rgba(87, 199, 182, 0.55);
    text-underline-offset: 3px;
}

.tx-feature-link:hover,
.tx-feature-link:focus {
    color: var(--accent);
    outline: none;
}

.tx-modal-open {
    overflow: hidden;
}

.tx-feature-modal[hidden] {
    display: none;
}

.tx-feature-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    background: rgba(4, 8, 14, 0.72);
    padding: 20px;
}

.tx-feature-dialog {
    position: relative;
    width: min(880px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow: auto;
    border: 1px solid rgba(87, 199, 182, 0.45);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.46);
    padding: 24px;
}

.tx-feature-close {
    position: absolute;
    top: 14px;
    right: 14px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    cursor: pointer;
    font-weight: 850;
    padding: 0 11px;
}

.tx-feature-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 18px;
}

.tx-feature-meta div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 10px;
}

.tx-feature-meta span {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tx-feature-meta strong {
    display: block;
    margin-top: 3px;
    color: var(--text);
    font-size: 0.92rem;
}

.tx-feature-body {
    color: var(--muted);
}

.tx-feature-body h3 {
    margin-top: 18px;
}

.tx-feature-formula {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 12px;
}

.tx-feature-formula + .tx-feature-formula {
    margin-top: 10px;
}

.tx-feature-formula strong {
    color: var(--text);
}

.tx-feature-formula code {
    display: block;
    width: 100%;
    color: #dbe7f3;
}

.tx-feature-formula p {
    margin: 0;
}

.tx-feature-transcript {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    overflow: hidden;
}

.tx-feature-transcript summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 900;
    padding: 12px 14px;
}

.tx-feature-dev {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    overflow: hidden;
}

.tx-feature-dev summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 850;
    padding: 12px 14px;
}

.tx-feature-dev ul {
    margin: 0;
    padding: 0 14px 14px 32px;
}

.tx-feature-transcript p,
.tx-feature-transcript blockquote {
    margin: 0;
    padding: 0 14px 12px;
}

.tx-feature-transcript blockquote {
    color: var(--text);
    border-left: 3px solid var(--accent);
    margin: 0 14px 14px;
    padding: 0 0 0 12px;
}

.tx-transcript-lines {
    display: grid;
    gap: 8px;
    padding: 0 14px 14px;
}

.tx-transcript-lines p {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.tx-transcript-lines strong {
    color: var(--accent);
    font-size: 0.84rem;
}

.tx-transcript-lines span {
    color: var(--muted);
}

.tx-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 9px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 850;
    white-space: nowrap;
}

.tx-status-active {
    border-color: rgba(87, 199, 182, 0.7);
    background: rgba(87, 199, 182, 0.14);
}

.tx-status-tbd {
    border-color: rgba(240, 195, 106, 0.72);
    background: rgba(240, 195, 106, 0.14);
}

.tx-status-discussion {
    border-color: rgba(255, 132, 104, 0.78);
    background: rgba(255, 132, 104, 0.15);
}

.tx-status-ready {
    border-color: rgba(87, 199, 182, 0.7);
    background: rgba(87, 199, 182, 0.14);
}

.tx-status-shaping {
    border-color: rgba(240, 195, 106, 0.72);
    background: rgba(240, 195, 106, 0.14);
}

.tx-status-research {
    border-color: rgba(216, 155, 255, 0.72);
    background: rgba(216, 155, 255, 0.14);
}

.tx-status-input {
    border-color: rgba(116, 211, 255, 0.72);
    background: rgba(116, 211, 255, 0.14);
}

.tx-status-ai {
    border-color: rgba(216, 155, 255, 0.72);
    background: rgba(216, 155, 255, 0.14);
}

.tx-status-verify {
    border-color: rgba(145, 171, 255, 0.72);
    background: rgba(145, 171, 255, 0.14);
}

.tx-status-held {
    border-color: rgba(170, 180, 194, 0.68);
    background: rgba(255, 255, 255, 0.065);
    color: var(--muted);
}

th,
td {
    text-align: left;
    vertical-align: top;
    border: 1px solid var(--line);
    padding: 12px;
}

th {
    color: var(--text);
    background: var(--panel-soft);
}

td {
    color: var(--muted);
}

.tx-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 24px 42px;
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 880px) {
    .tx-header {
        grid-template-columns: 1fr;
        gap: 16px;
        padding-top: 24px;
    }

    .tx-home {
        width: max-content;
        min-width: 96px;
    }

    .tx-layout {
        grid-template-columns: 1fr;
    }

    .tx-toc {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .tx-faq-tools {
        grid-template-columns: 1fr;
    }

    .tx-log-filter {
        grid-template-columns: 1fr;
    }

    .tx-feature-meta {
        grid-template-columns: 1fr;
    }

    .tx-transcript-lines p {
        grid-template-columns: 1fr;
    }

    section {
        padding: 20px;
    }

    .tx-footer {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .tx-header,
    .tx-layout,
    .tx-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .tx-toc {
        grid-template-columns: 1fr;
    }

    .tx-search-row {
        grid-template-columns: 1fr;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}
