:root {
    --tl-accent: #ff6b35;
    --tl-danger: #b04a2a;
    --tl-success: #047857;
    --tl-glass: rgba(255, 255, 255, 0.12);
    --tl-glass-border: rgba(255, 255, 255, 0.22);
    --tl-focus: 0 0 0 3px rgba(102, 201, 243, 0.45);
    --tl-header: 67px;
    --xh-screen-dark: #1e1f22;
    --xh-screen-light: #d9d9d9;
    --xh-screen-sand: #c9a46a;
    --xh-mono: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --xh-tile-h: 84px;
}

.xh-page {
    padding-top: 6px;
}

.xh-page h2,
.xh-page h3 {
    color: var(--tl-text);
}

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

.xh-breadcrumb .breadcrumb-item.active {
    min-width: 0;
    overflow: hidden;
}

.xh-breadcrumb .breadcrumb-item.active span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xh-hero {
    position: relative;
    margin-top: var(--tl-gap-crumbs);
    padding-left: var(--tl-inset);
}

.xh-hero h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--tl-text);
}

.xh-hero-art {
    display: none;
}

.xh-lead {
    max-width: 75ch;
    margin: var(--tl-gap-lead) 0 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--tl-text-muted);
}

.xh-js .xh-lead {
    display: -webkit-box;
    padding-right: 96px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.xh-js .xh-lead.is-open {
    display: block;
    padding-right: 0;
    overflow: visible;
}

.xh-lead-more {
    display: none;
    position: absolute;
    right: 0;
    bottom: -11px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    color: var(--tl-primary-dark);
    cursor: pointer;
}

.xh-js .xh-lead-more {
    display: block;
}

.xh-js .xh-lead-more[hidden] {
    display: none;
}

.xh-lead-more span {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.xh-lead-more:hover,
.xh-lead-more:focus-visible {
    color: var(--tl-primary);
}

.xh-lead-more:focus-visible {
    outline: none;
    border-radius: 4px;
    box-shadow: var(--tl-focus);
}

.xh-tool {
    position: relative;
    margin-top: var(--tl-gap-tool);
    border-radius: var(--tl-radius-lg);
    background: var(--tl-card-bg);
    box-shadow: var(--tl-shadow-card);
}

.xh-head {
    padding: 10px var(--tl-inset) 10px;
    border-radius: var(--tl-radius-lg) var(--tl-radius-lg) 0 0;
    background: var(--tl-gradient-panel);
    color: #fff;
    scroll-margin-top: calc(var(--tl-header) + 8px);
}

.xh-field-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 30px;
    margin: 0 0 6px;
}

.xh-label {
    display: block;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.xh-input-wrap {
    position: relative;
}

.xh-input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 52px 0 14px;
    border: 1px solid var(--tl-glass-border);
    border-radius: var(--tl-radius-sm);
    background: rgba(0, 0, 0, 0.18);
    font-size: 17px;
    font-weight: 500;
    color: #fff;
    caret-color: var(--tl-primary-light);
    text-overflow: ellipsis;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.xh-input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.xh-input:hover {
    border-color: rgba(255, 255, 255, 0.32);
}

.xh-input:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.xh-input:placeholder-shown {
    padding-right: 14px;
}

.xh-clear {
    position: absolute;
    top: 3px;
    right: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.xh-paste {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--tl-glass-border);
    border-radius: 30px;
    background: var(--tl-glass);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.xh-paste::before {
    content: "";
    position: absolute;
    inset: -7px -4px;
}

.xh-paste[hidden],
.xh-clear[hidden] {
    display: none;
}

.xh-paste:hover,
.xh-clear:hover {
    background: rgba(255, 255, 255, 0.2);
}

.xh-paste:focus-visible,
.xh-clear:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.xh-sets {
    display: flex;
    gap: 6px;
    margin: 8px calc(var(--tl-inset) * -1) 0;
    padding: 0 var(--tl-inset) 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.xh-sets::-webkit-scrollbar {
    display: none;
}

.xh-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--tl-glass-border);
    border-radius: 30px;
    background: var(--tl-glass);
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.xh-chip[hidden] {
    display: none;
}

.xh-chip:hover {
    background: rgba(255, 255, 255, 0.2);
}

.xh-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.xh-chip[aria-pressed="true"] {
    border-color: #fff;
    background: #fff;
    color: var(--tl-primary-dark);
    font-weight: 600;
}

.xh-chip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.xh-chip-dot.is-green {
    background: #00ff00;
}

.xh-chip-dot.is-cyan {
    background: #00ffff;
}

.xh-chip-dot.is-white {
    background: #fff;
}

.xh-chip-dot.is-yellow {
    background: #ffff00;
}

.xh-chip-dot.is-red {
    background: #ff2a2a;
}

.xh-msg {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #fff;
}

.xh-msg:empty {
    display: none;
}

.xh-note {
    display: flex;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 11.5px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.88);
}

.xh-note i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: #9be7c4;
}

.xh-note.is-stale i {
    color: #ffd18a;
}

.xh-note.is-warn {
    padding: 8px 10px;
    border-radius: var(--tl-radius-xs);
    background: rgba(255, 209, 138, 0.18);
    border: 1px solid rgba(255, 209, 138, 0.5);
    font-weight: 600;
    color: #fff;
}

.xh-note.is-warn i {
    color: #ffd18a;
}

.xh-timeline.xh-patches {
    margin-top: -12px;
    padding-top: 12px;
}

.xh-timeline.xh-patches > li::before {
    background: #ffb38f;
}

.xh-patch-title {
    font-weight: 600;
}

.xh-patch {
    margin-top: 0;
}

.xh-patch .xh-fold-body {
    padding: 10px 12px;
    border-radius: var(--tl-radius-sm);
    background: var(--tl-bg);
}

.xh-section .xh-patch-note {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--tl-text-muted);
}

.xh-patch-lines {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.xh-body {
    padding: 10px var(--tl-inset) 16px;
}

.xh-error {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(176, 74, 42, 0.25);
    border-radius: var(--tl-radius-sm);
    background: #fff6f2;
    color: #7a2f17;
}

.xh-error[hidden] {
    display: none;
}

.xh-error > i {
    flex: 0 0 auto;
    margin-top: 2px;
    font-size: 18px;
    color: var(--tl-danger);
}

.xh-error-main {
    min-width: 0;
}

.xh-error-text,
.xh-error-hint {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

.xh-error-hint {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 500;
}

.xh-error-code {
    margin: 6px 0 0;
    font-family: var(--xh-mono);
    font-size: 13px;
    line-height: 1.5;
    word-break: break-all;
    color: #4a2a1f;
}

.xh-error-code mark {
    padding: 0 1px;
    border-radius: 3px;
    background: #ffd2c2;
    color: #8a1f00;
    font-weight: 700;
}

.xh-error-code[hidden],
.xh-error-hint[hidden] {
    display: none;
}

.xh-result {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--tl-border);
    border-radius: var(--tl-radius);
    background: var(--tl-bg);
}

.xh-result[hidden] {
    display: none;
}

.xh-result-tile {
    --xh-tile-h: 120px;
}

.xh-result-main {
    min-width: 0;
}

.xh-badge {
    display: inline-flex;
    max-width: 100%;
    margin: 0;
    padding: 5px 12px;
    border-radius: 14px;
    background: rgba(4, 120, 87, 0.1);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--tl-success);
}

.xh-badge.is-old {
    background: rgba(255, 107, 53, 0.12);
    color: #a03f1f;
}

.xh-page .xh-result-title {
    margin: 8px 0 0;
    color: var(--tl-text);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.xh-result-summary {
    margin: 4px 0 0;
    font-size: 15px;
    line-height: 1.45;
    color: var(--tl-text-muted);
}

.xh-res {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 12px;
    margin-top: 12px;
}

.xh-res[hidden],
.xh-res-custom[hidden] {
    display: none;
}

.xh-res-field,
.xh-res-custom {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.xh-res-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tl-text);
}

.xh-res-hint {
    font-size: 12px;
    color: var(--tl-text-muted);
}

.xh-select-wrap {
    position: relative;
    display: block;
}

.xh-select {
    min-width: 230px;
    height: 44px;
    padding: 0 38px 0 12px;
    border: 1px solid rgba(0, 75, 105, 0.18);
    border-radius: var(--tl-radius-sm);
    background: var(--tl-card-bg);
    font-size: 15px;
    font-weight: 500;
    color: var(--tl-text);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.xh-select-wrap i {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--tl-text-muted);
}

.xh-select:hover {
    border-color: rgba(0, 75, 105, 0.32);
}

.xh-select:focus-visible {
    outline: none;
    box-shadow: var(--tl-focus);
}

.xh-num {
    width: 76px;
    height: 44px;
    padding: 0 8px;
    border: 1px solid rgba(0, 75, 105, 0.18);
    border-radius: var(--tl-radius-xs);
    background: var(--tl-card-bg);
    font-family: var(--xh-mono);
    font-size: 15px;
    color: var(--tl-text);
    text-align: center;
}

.xh-res-num {
    width: 120px;
}

.xh-num:hover {
    border-color: rgba(0, 75, 105, 0.32);
}

.xh-num:focus {
    outline: none;
    border-color: var(--tl-primary-dark);
    box-shadow: var(--tl-focus);
}

.xh-notes {
    margin-top: 12px;
}

.xh-notes[hidden],
.xh-result-note[hidden] {
    display: none;
}

.xh-page .xh-notes-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
}

.xh-notes-list {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tl-text);
}

.xh-notes-list li + li {
    margin-top: 4px;
}

.xh-result-note {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tl-text-muted);
}

.xh-code-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.xh-code-field {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(0, 75, 105, 0.18);
    border-radius: var(--tl-radius-sm);
    background: var(--tl-card-bg);
    font-family: var(--xh-mono);
    font-size: 13px;
    color: var(--tl-text);
    text-overflow: ellipsis;
}

.xh-code-field:focus {
    outline: none;
    border-color: var(--tl-primary-dark);
    box-shadow: var(--tl-focus);
}

.xh-result-actions,
.xh-cmds-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 10px;
}

.xh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.xh-btn:hover,
.xh-btn:focus {
    text-decoration: none;
}

.xh-btn:focus-visible {
    outline: none;
    box-shadow: var(--tl-focus);
}

.xh-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.xh-btn-primary {
    background: var(--tl-primary-dark);
    color: #fff;
}

.xh-btn-primary:hover,
.xh-btn-primary:focus {
    background: #005f85;
    color: #fff;
}

.xh-btn-ghost {
    padding: 0 14px;
    border-color: rgba(0, 75, 105, 0.18);
    background: var(--tl-card-bg);
    font-size: 14px;
    color: var(--tl-primary-dark);
}

.xh-btn-ghost:hover,
.xh-btn-ghost:focus {
    background: var(--tl-bg-alt);
    color: var(--tl-primary-dark);
}

.xh-btn.is-done,
.xh-btn.is-done:hover {
    background: var(--tl-success);
    border-color: var(--tl-success);
    color: #fff;
}

.xh-where-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tl-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.xh-where-link:hover,
.xh-where-link:focus-visible {
    color: var(--tl-primary);
}

.xh-where-link:focus-visible {
    outline: none;
    border-radius: 4px;
    box-shadow: var(--tl-focus);
}

.xh-hook {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: var(--tl-radius-sm);
    background: var(--tl-card-bg);
    border: 1px solid var(--tl-border);
    font-size: 14px;
    line-height: 1.5;
    color: var(--tl-text);
}

.xh-sheet .xh-hook {
    background: var(--tl-bg);
}

.xh-hook-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 30px;
    background: var(--tl-primary-dark);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.xh-hook-link:hover,
.xh-hook-link:focus {
    background: #005f85;
    color: #fff;
    text-decoration: none;
}

.xh-hook-link:focus-visible {
    outline: none;
    box-shadow: var(--tl-focus);
}

.xh-converted {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 107, 53, 0.28);
    border-radius: var(--tl-radius-sm);
    background: #fff6f2;
}

.xh-converted[hidden] {
    display: none;
}

.xh-converted-plate {
    display: flex;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: #7a2f17;
}

.xh-converted-plate i {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--tl-danger);
}

.xh-orig {
    margin-top: 2px;
}

.xh-orig .xh-fold-toggle,
.xh-patch .xh-fold-toggle {
    justify-content: flex-start;
    width: auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--tl-primary-dark);
}

.xh-orig .xh-fold-toggle span,
.xh-patch .xh-fold-toggle span {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.xh-orig-code {
    display: block;
    padding: 8px 10px;
    border-radius: var(--tl-radius-xs);
    background: var(--tl-card-bg);
    font-family: var(--xh-mono);
    font-size: 13px;
    color: #6b7686;
    text-decoration: line-through;
    word-break: break-all;
}

.xh-orig-note {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #7a2f17;
}

.xh-card-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 1;
    padding: 2px 8px;
    border-radius: 10px;
    background: #ffe3d6;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    color: #8a3112;
}

.xh-card-badge[hidden] {
    display: none;
}

.xh-card.is-converted {
    border-color: rgba(255, 107, 53, 0.35);
}

.xh-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.xh-bar[hidden] {
    display: none;
}

.xh-count {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--tl-text);
}

.xh-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--tl-primary-dark);
    cursor: pointer;
}

.xh-reset:hover {
    color: var(--tl-primary);
}

.xh-reset:focus-visible {
    outline: none;
    border-radius: 6px;
    box-shadow: var(--tl-focus);
}

.xh-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px;
    border: 2px dashed rgba(0, 75, 105, 0.14);
    border-radius: var(--tl-radius-sm);
}

.xh-empty[hidden] {
    display: none;
}

.xh-empty-text {
    max-width: 75ch;
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--tl-text);
}

.xh-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.xh-grid[hidden] {
    display: none;
}

.xh-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 6px 6px 8px;
    border: 1px solid #e6eaf0;
    border-radius: var(--tl-radius-sm);
    background: var(--tl-card-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.xh-card:hover {
    border-color: rgba(0, 119, 163, 0.35);
    box-shadow: var(--tl-shadow);
}

.xh-card:focus-within {
    border-color: rgba(0, 119, 163, 0.45);
}

.xh-tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--xh-tile-h);
    border-radius: 8px;
    background: var(--xh-screen-dark);
    overflow: hidden;
}

.xh-tile[data-bg="light"] {
    background: var(--xh-screen-light);
}

.xh-tile[data-bg="sand"] {
    background: var(--xh-screen-sand);
}

.xh-canvas {
    display: block;
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.xh-result-tile .xh-canvas {
    width: 144px;
    height: 144px;
}

.xh-tile-tag {
    position: absolute;
    right: 7px;
    bottom: 5px;
    font-size: 10.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.62);
    pointer-events: none;
}

.xh-tile-tag[hidden] {
    display: none;
}

.xh-tile-off {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
    color: rgba(255, 255, 255, 0.82);
    background: var(--xh-screen-dark);
}

.xh-tile-off[hidden] {
    display: none;
}

.xh-card-link {
    display: block;
    margin-top: 7px;
    padding: 0 2px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--tl-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xh-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--tl-radius-sm);
}

.xh-card-link:hover,
.xh-card-link:focus {
    color: var(--tl-primary-dark);
    text-decoration: none;
}

.xh-card-link:focus-visible {
    outline: none;
}

.xh-card-link:focus-visible::after {
    box-shadow: var(--tl-focus);
}

.xh-card-seen {
    padding: 0 2px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--tl-text-muted);
}

.xh-card-code,
.xh-card-where {
    display: block;
    height: 20px;
    margin-top: 2px;
    padding: 0 2px;
    font-size: 11.5px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xh-card-code {
    font-family: var(--xh-mono);
    color: #6b7686;
}

.xh-card-where {
    display: none;
    position: relative;
    z-index: 2;
    font-size: 13px;
    font-weight: 600;
    color: var(--tl-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.xh-card.is-copied .xh-card-code {
    display: none;
}

.xh-card.is-copied .xh-card-where {
    display: block;
}

.xh-card-where:hover,
.xh-card-where:focus-visible {
    color: var(--tl-primary);
}

.xh-card-where:focus-visible {
    outline: none;
    border-radius: 4px;
    box-shadow: var(--tl-focus);
}

.xh-card-copy {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    margin-top: 6px;
    padding: 0 8px;
    border: 0;
    border-radius: 10px;
    background: var(--tl-bg-alt);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tl-primary-dark);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.xh-card-copy:hover {
    background: #d7e3ee;
}

.xh-card-copy:focus-visible {
    outline: none;
    box-shadow: var(--tl-focus);
}

.xh-card-copy.is-done,
.xh-card-copy.is-done:hover {
    background: var(--tl-success);
    color: #fff;
}

.xh-dot-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    margin-top: 10px;
    padding: 8px 14px;
    border: 2px dashed rgba(0, 75, 105, 0.2);
    border-radius: var(--tl-radius-sm);
    background: var(--tl-card-bg);
    font-size: 15px;
    font-weight: 600;
    color: var(--tl-primary-dark);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.xh-dot-tile[hidden] {
    display: none;
}

.xh-dot-tile:hover {
    border-color: rgba(0, 75, 105, 0.38);
    background: var(--tl-bg);
}

.xh-dot-tile:focus-visible {
    outline: none;
    box-shadow: var(--tl-focus);
}

.xh-dot-tile-icon {
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--xh-screen-dark);
}

.xh-dot-tile-icon::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 16px;
    width: 8px;
    height: 8px;
    background: #00ff00;
}

.xh-more {
    display: flex;
    width: 100%;
    margin-top: 14px;
}

.xh-more[hidden],
html:not(.xh-js) .xh-more {
    display: none;
}

.xh-sheet {
    margin-top: 16px;
    border: 1px solid var(--tl-border);
    border-radius: var(--tl-radius-lg);
    background: var(--tl-card-bg);
    box-shadow: var(--tl-shadow);
}

.xh-js .xh-sheet:not(.is-open) {
    display: none;
}

.xh-sheet.is-open {
    position: fixed;
    inset: 0;
    z-index: 1060;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--tl-card-bg);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

html.xh-lock,
html.xh-lock body {
    overflow: hidden;
}

.xh-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 6px 6px var(--tl-inset);
    border-bottom: 1px solid #eef2f6;
}

.xh-sheet.is-open .xh-sheet-head {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--tl-card-bg);
}

.xh-page .xh-sheet-title {
    min-width: 0;
    color: var(--tl-text);
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xh-sheet-close {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--tl-bg);
    font-size: 20px;
    color: var(--tl-text);
    cursor: pointer;
}

html:not(.xh-js) .xh-sheet-close {
    display: none;
}

.xh-sheet-close:hover {
    background: var(--tl-bg-alt);
}

.xh-sheet-close:focus-visible {
    outline: none;
    box-shadow: var(--tl-focus);
}

.xh-sheet-body {
    display: grid;
    gap: 16px;
    padding: 12px var(--tl-inset) 20px;
}

.xh-sheet-view,
.xh-sheet-info {
    min-width: 0;
}

.xh-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    border-radius: var(--tl-radius-sm);
    background: var(--xh-screen-dark);
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.xh-stage[data-bg="light"] {
    background: var(--xh-screen-light);
}

.xh-stage[data-bg="sand"] {
    background: var(--xh-screen-sand);
}

.xh-stage-canvas {
    display: block;
    flex: 0 0 auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.xh-stage-caption {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--tl-text-muted);
}

.xh-stage-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 10px;
}

html:not(.xh-js) .xh-stage-controls {
    display: none;
}

.xh-ctl,
.xh-ed-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.xh-ctl-label,
.xh-ed-label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--tl-text-muted);
}

.xh-seg-group {
    display: inline-flex;
    padding: 3px;
    border-radius: 30px;
    background: var(--tl-bg-alt);
}

.xh-seg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 30px;
    background: transparent;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tl-text);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.xh-seg:hover {
    background: rgba(255, 255, 255, 0.6);
}

.xh-seg:focus-visible {
    outline: none;
    box-shadow: var(--tl-focus);
}

.xh-seg[aria-pressed="true"] {
    background: var(--tl-card-bg);
    color: var(--tl-primary-dark);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 75, 105, 0.16);
}

.xh-seg:disabled {
    opacity: 0.5;
    cursor: default;
}

.xh-seg-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.xh-seg-swatch.is-light {
    background: var(--xh-screen-light);
}

.xh-seg-swatch.is-dark {
    background: var(--xh-screen-dark);
}

.xh-seg-swatch.is-sand {
    background: var(--xh-screen-sand);
}

.xh-edit-open {
    width: 100%;
    margin-top: 14px;
}

html:not(.xh-js) .xh-edit-open {
    display: none;
}

.xh-edit-open[aria-expanded="true"] {
    display: none;
}

.xh-editor {
    display: grid;
    gap: 14px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--tl-border);
    border-radius: var(--tl-radius);
    background: var(--tl-bg);
}

.xh-js .xh-editor:not(.is-open) {
    display: none;
}

.xh-ed-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.xh-quick {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px 0 8px;
    border: 1px solid rgba(0, 75, 105, 0.18);
    border-radius: 30px;
    background: var(--tl-card-bg);
    font-size: 14px;
    font-weight: 600;
    color: var(--tl-primary-dark);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.xh-quick:hover {
    background: var(--tl-bg-alt);
}

.xh-quick:focus-visible {
    outline: none;
    box-shadow: var(--tl-focus);
}

.xh-quick-ico {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--xh-screen-dark);
}

.xh-quick-ico::before,
.xh-quick-ico::after {
    content: "";
    position: absolute;
    background: #00ffff;
}

.xh-quick-ico.is-dot::before {
    top: 12px;
    left: 12px;
    width: 4px;
    height: 4px;
}

.xh-quick-ico.is-dot::after {
    display: none;
}

.xh-quick-ico.is-white::before,
.xh-quick-ico.is-plain::before {
    top: 13px;
    left: 6px;
    width: 16px;
    height: 2px;
}

.xh-quick-ico.is-white::after,
.xh-quick-ico.is-plain::after {
    top: 6px;
    left: 13px;
    width: 2px;
    height: 16px;
}

.xh-quick-ico.is-white::before,
.xh-quick-ico.is-white::after {
    background: #fff;
}

.xh-quick-ico.is-plain {
    background: var(--xh-screen-light);
}

.xh-quick-ico.is-plain::before,
.xh-quick-ico.is-plain::after {
    background: #00b3b3;
}

.xh-swatches {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.xh-swatch {
    position: relative;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 75, 105, 0.22);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.xh-swatch::before {
    content: "";
    position: absolute;
    inset: -6px;
}

.xh-swatch:hover {
    box-shadow: 0 0 0 1px rgba(0, 75, 105, 0.5);
}

.xh-swatch:focus-visible {
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 75, 105, 0.5), var(--tl-focus);
}

.xh-swatch[aria-pressed="true"] {
    box-shadow: 0 0 0 2px var(--tl-primary-dark);
}

.xh-swatch.is-green {
    background: #00ff00;
}

.xh-swatch.is-cyan {
    background: #00ffff;
}

.xh-swatch.is-white {
    background: #fff;
    border-color: #e6eaf0;
}

.xh-swatch.is-yellow {
    background: #ffff00;
}

.xh-swatch.is-red {
    background: #ff0000;
}

.xh-swatch.is-pink {
    background: #ff00aa;
}

.xh-swatch.is-purple {
    background: #a000ff;
}

.xh-swatch.is-black {
    background: #000;
}

.xh-hex {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--tl-text-muted);
}

.xh-hex-input {
    width: 100px;
    text-transform: uppercase;
}

.xh-ed-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    grid-template-areas:
        "label label"
        "slider num";
    align-items: center;
    gap: 2px 12px;
}

.xh-ed-range .xh-ed-label {
    grid-area: label;
}

.xh-ed-range .xh-slider {
    grid-area: slider;
}

.xh-ed-range .xh-num {
    grid-area: num;
}

.xh-slider {
    width: 100%;
    height: 44px;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.xh-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: #d3dee8;
}

.xh-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #d3dee8;
}

.xh-slider::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    margin-top: -9px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--tl-primary-dark);
    box-shadow: 0 1px 4px rgba(0, 75, 105, 0.35);
    -webkit-appearance: none;
    appearance: none;
}

.xh-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--tl-primary-dark);
    box-shadow: 0 1px 4px rgba(0, 75, 105, 0.35);
}

.xh-slider:focus {
    outline: none;
}

.xh-slider:focus-visible::-webkit-slider-thumb {
    box-shadow: var(--tl-focus);
}

.xh-slider:focus-visible::-moz-range-thumb {
    box-shadow: var(--tl-focus);
}

.xh-ed-msg {
    margin: -6px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--tl-danger);
}

.xh-ed-msg:empty {
    display: none;
}

.xh-ed-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.xh-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--tl-text);
    cursor: pointer;
}

.xh-toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.xh-toggle-ui {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    border-radius: 12px;
    background: #c3d0dc;
    transition: background-color 0.2s ease;
}

.xh-toggle-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.xh-toggle input:checked + .xh-toggle-ui {
    background: var(--tl-primary-dark);
}

.xh-toggle input:checked + .xh-toggle-ui::after {
    transform: translateX(18px);
}

.xh-toggle input:focus-visible + .xh-toggle-ui {
    box-shadow: var(--tl-focus);
}

.xh-toggle input:disabled + .xh-toggle-ui {
    opacity: 0.5;
}

.xh-ed-reset {
    justify-self: start;
}

.xh-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 14px;
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--tl-text-muted);
}

.xh-meta-match {
    flex: 1 1 100%;
}

.xh-meta-source {
    flex: 1 1 100%;
    font-size: 13px;
}

.xh-meta-match:empty,
.xh-meta-source:empty,
.xh-meta[hidden] {
    display: none;
}

.xh-code-block {
    margin-top: 6px;
}

.xh-code-label {
    display: block;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--tl-text-muted);
}

.xh-code-label.is-edited {
    color: var(--tl-primary-dark);
}

.xh-code-block .xh-code-row {
    margin-top: 6px;
}

.xh-fold {
    margin-top: 10px;
}

.xh-fold-head {
    margin: 0;
}

.xh-fold-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 0 2px;
    border: 0;
    background: none;
    font-size: 15px;
    font-weight: 700;
    color: var(--tl-text);
    text-align: left;
    cursor: pointer;
}

.xh-where .xh-fold-toggle {
    justify-content: flex-start;
    width: auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--tl-primary-dark);
}

.xh-where .xh-fold-toggle span {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.xh-fold-toggle:hover {
    color: var(--tl-primary-dark);
}

.xh-fold-toggle:focus-visible {
    outline: none;
    border-radius: 6px;
    box-shadow: var(--tl-focus);
}

.xh-fold-toggle i {
    transition: transform 0.2s ease;
}

.xh-fold.is-open > .xh-fold-toggle i,
.xh-fold.is-open > .xh-fold-head i {
    transform: rotate(180deg);
}

html:not(.xh-js) .xh-fold-toggle i {
    display: none;
}

.xh-js .xh-fold:not(.is-open) > .xh-fold-body {
    display: none;
}

.xh-cmds {
    border-top: 1px solid #eef2f6;
    padding-top: 4px;
}

.xh-where-title {
    margin: 4px 0 8px;
    font-size: 14px;
    font-weight: 700;
}

.xh-where .xh-fold-body {
    padding: 12px 14px;
    border-radius: var(--tl-radius-sm);
    background: var(--tl-bg);
}

.xh-where-steps {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.xh-where-steps li + li {
    margin-top: 4px;
}

.xh-where-note {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--tl-text-muted);
}

.xh-cmds-list {
    max-height: 220px;
    margin: 4px 0 0;
    padding: 12px 14px;
    border-radius: var(--tl-radius-sm);
    background: var(--xh-screen-dark);
    font-family: var(--xh-mono);
    font-size: 12.5px;
    line-height: 1.6;
    color: #cfeef7;
    white-space: pre;
    overflow: auto;
}

.xh-cmds-list:focus-visible {
    outline: none;
    box-shadow: var(--tl-focus);
}

.xh-params {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #eef2f6;
}

.xh-page .xh-params-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
}

.xh-params-list {
    display: grid;
    grid-template-columns: 1fr;
    margin: 0;
}

.xh-params-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid #f0f3f7;
    font-size: 14px;
    line-height: 1.4;
}

.xh-params-list dt {
    font-weight: 500;
    color: var(--tl-text-muted);
}

.xh-params-list dd {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 600;
    color: var(--tl-text);
    text-align: right;
}

.xh-param-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.xh-section {
    margin-top: 16px;
    padding: 20px calc(var(--tl-inset) - 1px);
    border: 1px solid rgba(0, 75, 105, 0.06);
    border-radius: var(--tl-radius-lg);
    background: var(--tl-card-bg);
    box-shadow: var(--tl-shadow);
}

.xh-section h2 {
    position: relative;
    margin: 0 0 12px;
    padding-left: 14px;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    scroll-margin-top: calc(var(--tl-header) + 8px);
}

.xh-section h2::before {
    content: "";
    position: absolute;
    top: 0.18em;
    bottom: 0.18em;
    left: 0;
    width: 4px;
    border-radius: 2px;
    background: var(--tl-gradient);
}

.xh-section h3 {
    margin: 20px 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    scroll-margin-top: calc(var(--tl-header) + 8px);
}

.xh-section p,
.xh-steps,
.xh-timeline {
    max-width: 75ch;
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--tl-text);
}

.xh-section p:last-child {
    margin-bottom: 0;
}

.xh-section p a {
    color: var(--tl-primary-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.xh-timeline {
    padding: 0;
    list-style: none;
}

.xh-timeline > li {
    position: relative;
    padding: 0 0 12px 22px;
}

.xh-timeline > li::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 3px;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--tl-primary-light);
}

.xh-timeline > li::after {
    content: "";
    position: absolute;
    top: 22px;
    bottom: -2px;
    left: 7px;
    width: 1px;
    background: #d6e4ee;
}

.xh-timeline > li:last-child {
    padding-bottom: 0;
}

.xh-timeline > li:last-child::after {
    display: none;
}

.xh-steps {
    padding: 0;
    list-style: none;
    counter-reset: xh-step;
}

.xh-steps li {
    position: relative;
    min-height: 28px;
    padding-left: 40px;
    counter-increment: xh-step;
}

.xh-steps li + li {
    margin-top: 10px;
}

.xh-steps li::before {
    content: counter(xh-step);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--tl-bg-alt);
    font-size: 14px;
    font-weight: 700;
    color: var(--tl-primary-dark);
}

.xh-to-field {
    margin-top: 14px;
}

.xh-cols > div > h3:first-child {
    margin-top: 20px;
}

.xh-cols > div:first-child > h3:first-child {
    margin-top: 0;
}

.xh-table-wrap {
    margin: 8px 0 12px;
    overflow-x: auto;
    border: 1px solid var(--tl-bg-alt);
    border-radius: var(--tl-radius-sm);
}

.xh-table-wrap:focus-visible {
    outline: none;
    box-shadow: var(--tl-focus);
}

.xh-table {
    width: 100%;
    min-width: 560px;
    margin: 0;
    border-collapse: collapse;
}

.xh-table th {
    padding: 11px 14px;
    background: var(--tl-bg);
    font-size: 13px;
    font-weight: 600;
    color: var(--tl-text-muted);
    text-align: left;
}

.xh-table td {
    padding: 9px 14px;
    border-top: 1px solid var(--tl-bg-alt);
    font-size: 15px;
    line-height: 1.45;
    color: var(--tl-text);
    vertical-align: top;
}

.xh-table-cmds td:first-child {
    font-family: var(--xh-mono);
    font-size: 13px;
    white-space: nowrap;
    color: var(--tl-primary-dark);
}

.xh-table-styles {
    min-width: 0;
}

.xh-table-styles td:first-child {
    width: 64px;
    font-family: var(--xh-mono);
    font-weight: 700;
    color: var(--tl-primary-dark);
}

.xh-table-styles td:nth-child(2) {
    font-weight: 600;
}

.xh-faq-item {
    border: 1px solid #e6eaf0;
    border-radius: var(--tl-radius-sm);
    background: var(--tl-card-bg);
}

.xh-faq-item + .xh-faq-item {
    margin-top: 8px;
}

.xh-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 10px 14px;
    list-style: none;
    cursor: pointer;
}

.xh-faq-item summary::-webkit-details-marker {
    display: none;
}

.xh-faq-item summary:focus-visible {
    outline: none;
    border-radius: var(--tl-radius-sm);
    box-shadow: var(--tl-focus);
}

.xh-faq-item summary i {
    flex: 0 0 auto;
    color: var(--tl-text-muted);
    transition: transform 0.2s ease;
}

.xh-faq-item[open] summary i {
    transform: rotate(180deg);
}

.xh-js .xh-page:not(.xh-ready) .xh-faq-item > :not(summary) {
    display: none;
}

.xh-js .xh-page:not(.xh-ready) .xh-faq-item[open] summary i {
    transform: none;
}

.xh-section .xh-faq-item h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    transition: color 0.2s ease;
}

.xh-faq-item summary:hover h3 {
    color: var(--tl-primary-dark);
}

.xh-section .xh-faq-item p {
    margin: 0;
    padding: 0 14px 12px;
    font-size: 15px;
    color: #495057;
}

.xh-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.xh-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--tl-border);
    border-radius: var(--tl-radius-sm);
    background: var(--tl-bg);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--tl-primary-dark);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.xh-links a:hover,
.xh-links a:focus-visible {
    background: var(--tl-bg-alt);
    color: var(--tl-primary-dark);
    text-decoration: none;
}

.xh-links a:focus-visible {
    outline: none;
    box-shadow: var(--tl-focus);
}

.xh-head.is-code .xh-sets,
.xh-head.is-code .xh-note {
    display: none;
}

@media (max-width: 767.98px) {
    .xh-result {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .xh-result-main {
        display: contents;
    }

    .xh-result-main > * {
        min-width: 0;
    }

    .xh-result-view {
        order: 1;
        margin-top: 12px;
    }

    .xh-result-summary {
        order: 1;
    }

    .xh-notes,
    .xh-result-note,
    .xh-result .xh-hook {
        order: 2;
    }

    .xh-badge {
        align-self: flex-start;
    }
}

@media (max-width: 991.98px) {
    .xh-sheet-view,
    .xh-sheet-info {
        display: contents;
    }

    .xh-stage {
        order: 1;
        height: 150px;
    }

    .xh-stage-caption {
        order: 2;
        margin-top: -10px;
    }

    .xh-stage-controls {
        order: 3;
        margin-top: -6px;
    }

    .xh-meta {
        order: 4;
    }

    .xh-converted {
        order: 4;
    }

    .xh-code-block {
        order: 5;
        margin-top: -10px;
    }

    .xh-edit-open {
        order: 6;
        margin-top: 0;
    }

    .xh-editor {
        order: 7;
        margin-top: 0;
    }

    .xh-cmds {
        order: 8;
    }

    .xh-params {
        order: 9;
    }

    .xh-sheet .xh-hook {
        order: 10;
    }

    .xh-sheet-body > *,
    .xh-sheet-view > *,
    .xh-sheet-info > * {
        min-width: 0;
    }

    .xh-sheet-info > .xh-fold,
    .xh-sheet-info > .xh-params,
    .xh-sheet-info > .xh-hook {
        margin-top: -6px;
    }

    .xh-sheet.is-editing .xh-code-block {
        order: 7;
        margin-top: 0;
    }

    .xh-sheet.is-open.is-editing .xh-stage {
        position: sticky;
        top: 57px;
        z-index: 2;
        box-shadow: 0 8px 16px rgba(0, 20, 40, 0.18);
    }
}

@media (min-width: 576px) {
    :root {
        --tl-header: 81px;
    }

    .xh-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .xh-code-row {
        flex-direction: row;
        align-items: center;
    }

    .xh-code-row .xh-btn {
        flex: 0 0 auto;
    }

    .xh-hook {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .xh-more {
        display: inline-flex;
        width: auto;
        margin-left: auto;
        margin-right: auto;
        padding: 0 28px;
    }

    .xh-body > .xh-more {
        display: flex;
        width: max-content;
    }

    .xh-ed-range {
        grid-template-columns: 96px minmax(0, 1fr) 76px;
        grid-template-areas: "label slider num";
    }

    .xh-params-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;
    }
}

@media (min-width: 768px) {
    :root {
        --xh-tile-h: 104px;
    }

    .xh-page {
        padding-top: 20px;
    }

    .xh-hero h1 {
        font-size: clamp(1.8rem, 3.2vw, 2.3rem);
    }

    .xh-lead,
    .xh-js .xh-lead {
        display: block;
        padding-right: 0;
        font-size: 17px;
        line-height: 1.6;
    }

    .xh-js .xh-lead-more {
        display: none;
    }

    .xh-head {
        padding: 20px var(--tl-inset) 16px;
    }

    .xh-note {
        font-size: 12.5px;
        line-height: 1.4;
    }

    .xh-input {
        height: 58px;
        padding-left: 18px;
        font-size: 22px;
    }

    .xh-input:not(:placeholder-shown) {
        padding-right: 60px;
    }

    .xh-clear {
        top: 7px;
        right: 7px;
    }

    .xh-sets {
        flex-wrap: wrap;
        margin: 12px 0 0;
        padding: 0;
        overflow: visible;
    }

    .xh-body {
        padding: 18px var(--tl-inset) 24px;
    }

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

    .xh-card {
        padding: 8px 8px 10px;
    }

    .xh-result {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 20px;
        padding: 16px;
    }

    .xh-result-tile {
        --xh-tile-h: 220px;
    }

    .xh-result-tile .xh-canvas {
        width: 192px;
        height: 192px;
    }

    .xh-sheet.is-open {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 32px 24px;
        background: rgba(10, 24, 36, 0.6);
    }

    .xh-sheet.is-open .xh-sheet-box {
        width: 100%;
        max-width: 1040px;
        margin: auto 0;
        border-radius: var(--tl-radius-lg);
        background: var(--tl-card-bg);
        box-shadow: 0 24px 64px rgba(0, 20, 40, 0.35);
    }

    .xh-sheet.is-open .xh-sheet-head {
        position: static;
        border-radius: var(--tl-radius-lg) var(--tl-radius-lg) 0 0;
    }

    .xh-sheet-head {
        padding: 12px 12px 12px var(--tl-inset);
    }

    .xh-page .xh-sheet-title {
        font-size: 1.5rem;
    }

    .xh-sheet-body {
        padding: 18px var(--tl-inset) 24px;
    }

    .xh-stage {
        height: 260px;
    }

    .xh-section {
        margin-top: 20px;
        padding: 28px calc(var(--tl-inset) - 1px);
    }

    .xh-section h2 {
        font-size: 1.5rem;
    }

    .xh-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .xh-hero {
        padding-right: 384px;
    }

    .xh-hero h1 {
        text-wrap: balance;
    }

    .xh-hero-art {
        display: block;
        position: absolute;
        right: 0;
        bottom: -6px;
        width: 360px;
        height: 144px;
        background: url("../../img/tools/pricely-cs2/hero.svg") center / contain no-repeat;
        pointer-events: none;
    }

    .xh-sheet-body {
        grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
        gap: 28px;
    }

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

    .xh-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px;
    }

    .xh-cols > div > h3:first-child {
        margin-top: 0;
    }

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

@media (min-width: 1200px) {
    .xh-hero {
        padding-right: 464px;
    }

    .xh-hero-art {
        width: 440px;
        height: 176px;
    }

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

@media (min-width: 1400px) {
    .xh-head {
        display: grid;
        grid-template-columns: minmax(380px, 1fr) auto;
        grid-template-areas:
            "field sets"
            "msg msg"
            "note note";
        align-items: end;
        column-gap: 20px;
    }

    .xh-field {
        grid-area: field;
    }

    .xh-sets {
        grid-area: sets;
        flex-wrap: nowrap;
        margin: 0;
        padding-bottom: 9px;
    }

    .xh-msg {
        grid-area: msg;
    }

    .xh-note {
        grid-area: note;
    }

    .xh-note.is-stale {
        grid-area: auto;
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .xh-input,
    .xh-chip,
    .xh-card,
    .xh-card-copy,
    .xh-btn,
    .xh-seg,
    .xh-quick,
    .xh-swatch,
    .xh-stage,
    .xh-toggle-ui,
    .xh-toggle-ui::after,
    .xh-fold-toggle i,
    .xh-faq-item summary i,
    .xh-links a,
    .xh-dot-tile {
        transition: none;
    }
}
