/* DHS (Don't Hit Send). Black/white, two live panes, no send button. */

.dhs-page {
    color-scheme: dark;
    background: var(--color-black);
}

.dhs-page .site-main,
.dhs-page main.dhs {
    padding-top: 5.5rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.dhs {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 1120px;
    min-height: calc(100dvh - 5.5rem);
    margin: 0 auto;
    padding: 0 var(--layout-gutter) 4rem;
}

.dhs.is-attract .dhs-stage {
    cursor: pointer;
}

.dhs.is-attract .dhs-draft {
    caret-color: transparent;
    cursor: pointer;
}

.dhs-hero h1 {
    margin-top: 0.35rem;
    font-size: clamp(2.5rem, 7vw, 4.75rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.dhs-hero__lede {
    max-width: 36rem;
}

.dhs-chrome {
    display: grid;
    grid-template-columns: minmax(12rem, 18rem);
    gap: 0.85rem 1.25rem;
    align-items: end;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.dhs-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.dhs-input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0;
    background: transparent;
    color: var(--color-white);
    font: inherit;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

.dhs-input::placeholder {
    color: rgba(255, 255, 255, 0.32);
}

.dhs-input:focus,
.dhs-input:focus-visible {
    outline: none;
    border-color: var(--color-white);
}

.dhs-input--select {
    appearance: none;
    color-scheme: dark;
    background-color: #000;
    color: #fff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='white' d='M1 1.5 L6 6.5 L11 1.5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2rem;
}

.dhs-input--select option {
    background-color: #111;
    color: #fff;
}

.dhs-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "you wire model";
    gap: 0;
    height: min(62vh, 34rem);
    min-height: min(62vh, 34rem);
    max-height: min(62vh, 34rem);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.dhs-pane--you {
    grid-area: you;
}

.dhs-pane--model {
    grid-area: model;
}

.dhs-wire {
    grid-area: wire;
}

.dhs-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.dhs-pane__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem 0.4rem;
}

.dhs-pane__state {
    font-family: var(--font-meta);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
}

.dhs-pane.is-live .dhs-pane__state {
    color: var(--color-white);
}

.dhs-composer {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
}

.dhs-mention {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    margin: 0 1.1rem 0.35rem;
    padding: 0.45rem 0 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.dhs-mention[hidden] {
    display: none;
}

.dhs-mention__label {
    flex: none;
    font-family: var(--font-meta);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.dhs-mention__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dhs-mention__clear {
    flex: none;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font: inherit;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.dhs-mention__clear:hover,
.dhs-mention__clear:focus-visible {
    color: var(--color-white);
}

.dhs-draft,
.dhs-thread {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.32) transparent;
}

.dhs-draft::-webkit-scrollbar,
.dhs-thread::-webkit-scrollbar {
    display: block;
    width: 8px;
    height: 8px;
}

.dhs-draft::-webkit-scrollbar-track,
.dhs-thread::-webkit-scrollbar-track {
    background: transparent;
}

.dhs-draft::-webkit-scrollbar-thumb,
.dhs-thread::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.32);
}

.dhs-draft {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0.35rem 1.1rem 1.25rem;
    border: 0;
    background: transparent;
    color: var(--color-white);
    font: inherit;
    font-size: clamp(1.125rem, 2.2vw, 1.5rem);
    line-height: 1.45;
    letter-spacing: -0.025em;
    resize: none;
}

.dhs-draft:focus,
.dhs-draft:focus-visible {
    outline: none;
}

.dhs-draft::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.dhs-thread {
    margin: 0;
    padding: 0.35rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.dhs-thread.is-empty::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.28);
    font-size: clamp(1.125rem, 2.2vw, 1.5rem);
    letter-spacing: -0.025em;
}

.dhs-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dhs-msg:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.dhs-msg.is-mentioned {
    border-bottom-color: rgba(255, 255, 255, 0.28);
}

.dhs-msg__body {
    margin: 0;
    width: 100%;
    white-space: pre-wrap;
    color: var(--color-white);
    font-size: clamp(1.125rem, 2.2vw, 1.5rem);
    line-height: 1.45;
    letter-spacing: -0.025em;
}

.dhs-msg__think {
    margin: 0;
    width: 100%;
    white-space: pre-wrap;
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.78em;
    line-height: 1.4;
    letter-spacing: 0;
}

.dhs-msg__reply {
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.42);
    font-family: var(--font-meta);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.dhs-msg__reply:hover,
.dhs-msg__reply:focus-visible {
    color: var(--color-white);
}

.dhs-msg__reply:disabled {
    cursor: default;
    opacity: 0.35;
}

.dhs-thread .dhs-caret {
    display: inline-block;
    width: 0.45ch;
    height: 1em;
    margin-left: 0.08em;
    background: var(--color-white);
    transform: translateY(0.12em);
    animation: dhs-blink 1.05s steps(1) infinite;
}

@keyframes dhs-blink {
    50% { opacity: 0; }
}

.dhs-wire {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 4.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    border-right: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-meta);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dhs-wire__spine {
    width: 1px;
    flex: 1;
    max-height: 12rem;
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
}

.dhs-stage.is-streaming .dhs-wire__spine {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.9) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 100% 220%;
    animation: dhs-flow 0.9s linear infinite;
}

@keyframes dhs-flow {
    from { background-position: 0 -100%; }
    to { background-position: 0 200%; }
}

.dhs-meters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-top: 0;
}

.dhs-meters > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1.1rem 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.dhs-meters > div:last-child {
    border-right: 0;
}

.dhs-meters dt {
    font-family: var(--font-meta);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.dhs-meters dd {
    margin: 0;
    font-size: 1.375rem;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.dhs-error {
    margin: 0;
    color: #ff6b6b;
    font-size: 0.875rem;
}

.dhs-popup {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--layout-gutter);
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
}

.dhs-popup[hidden] {
    display: none;
}

.dhs-popup__card {
    width: min(32rem, 100%);
    padding: 1.75rem 1.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: var(--color-black);
}

.dhs-popup__card h2 {
    margin: 0.35rem 0 0;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.dhs-popup__card > p {
    margin: 0.85rem 0 0;
    max-width: 28rem;
    color: rgba(255, 255, 255, 0.62);
}

.dhs-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

body.dhs-popup-open {
    overflow: hidden;
}

.dhs-how {
    max-width: 40rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.dhs-how summary {
    cursor: pointer;
    font-family: var(--font-meta);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.dhs-how p {
    margin: 0.85rem 0 0;
}

.dhs-how p + p {
    margin-top: 0.65rem;
}

@media (max-width: 860px) {
    .dhs-page {
        height: var(--dhs-vvh, 100dvh);
        overflow: hidden;
        overscroll-behavior: none;
    }

    .dhs-page.dhs-keyboard {
        position: fixed;
        top: var(--dhs-vvo, 0px);
        left: 0;
        right: 0;
        height: var(--dhs-vvh, 100dvh);
    }

    .dhs-page.dhs-keyboard .site-header,
    .dhs-page.dhs-keyboard .site-footer,
    .dhs-page.dhs-keyboard .dhs-hero,
    .dhs-page.dhs-keyboard .dhs-chrome,
    .dhs-page.dhs-keyboard .dhs-meters,
    .dhs-page.dhs-keyboard .dhs-how,
    .dhs-page.dhs-keyboard .dhs-error,
    .dhs-page.dhs-keyboard .cookies-notification {
        display: none !important;
    }

    .dhs-page.dhs-keyboard main.dhs {
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
    }

    .dhs-page .site-main,
    .dhs-page main.dhs {
        padding-top: 4.35rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        height: 100%;
        min-height: 0;
        box-sizing: border-box;
    }

    .dhs {
        gap: 0.55rem;
        max-width: none;
        min-height: 0;
        height: 100%;
        padding: 0 var(--layout-gutter) 0;
    }

    .dhs-hero,
    .dhs-meters,
    .dhs-how,
    .dhs-page .site-footer {
        display: none;
    }

    .dhs-chrome {
        grid-template-columns: minmax(12rem, 18rem);
        gap: 0.5rem 0.75rem;
        flex: none;
        padding-bottom: 0.35rem;
    }

    .dhs-input {
        min-height: 2.4rem;
        padding: 0.4rem 0.7rem;
        font-size: 1rem;
    }

    .dhs-stage {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        max-height: none;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
        grid-template-areas:
            "model"
            "wire"
            "you";
    }

    .dhs-pane {
        min-height: 0;
        overflow: hidden;
    }

    .dhs-pane__meta {
        padding: 0.45rem 0.85rem 0.2rem;
    }

    .dhs-wire {
        flex-direction: row;
        width: auto;
        height: 1.35rem;
        border-left: 0;
        border-right: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    }

    .dhs-wire__spine {
        flex: 1;
        width: auto;
        height: 1px;
        max-height: none;
    }

    .dhs-stage.is-streaming .dhs-wire__spine {
        background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.9) 50%,
            rgba(255, 255, 255, 0) 100%
        );
        background-size: 220% 100%;
        animation: dhs-flow-x 0.9s linear infinite;
    }

    @keyframes dhs-flow-x {
        from { background-position: -100% 0; }
        to { background-position: 200% 0; }
    }

    .dhs-draft,
    .dhs-thread,
    .dhs-msg__body,
    .dhs-thread.is-empty::before {
        font-size: 1rem;
        letter-spacing: -0.015em;
    }

    .dhs-draft {
        min-height: 0;
        height: 100%;
        padding: 0.25rem 0.85rem 0.75rem;
    }

    .dhs-thread {
        min-height: 0;
        padding: 0.25rem 0.85rem 0.75rem;
        gap: 0.75rem;
    }

    .dhs-mention {
        margin: 0 0.85rem 0.25rem;
        padding: 0.3rem 0 0.4rem;
    }

    .dhs-popup {
        padding: 0.75rem;
        align-items: flex-end;
    }

    .dhs-page.dhs-keyboard .dhs-popup {
        padding-bottom: 0.5rem;
    }

    .dhs-popup__card {
        width: 100%;
        padding: 1.25rem 1.1rem 1.1rem;
    }

    .dhs-popup__card h2 {
        font-size: 1.65rem;
    }
}
