* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --shell-height: clamp(220px, 42vh, 360px);
    --shell-collapsed-height: 28px;
    --shell-grey-rgb: 22, 22, 22;
    --shell-body-rgb: 5, 5, 5;
    --hairline: 0.15px;
}

body {
    background-color: #020303;
    color: #eaeaea;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding-bottom: var(--shell-height);
    transition: padding-bottom 0.22s ease;
}

body.shell-is-collapsed {
    padding-bottom: var(--shell-collapsed-height);
}

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

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 2000;
    min-height: 24px;
    padding: 4px 8px;
    background: #050505;
    border: var(--hairline) solid rgba(255, 255, 255, 0.72);
    color: #ffffff;
    font: 11px/1.4 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', sans-serif;
    text-decoration: none;
    transform: translateY(-44px);
    transition: transform 0.16s ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
    outline: 0.5px solid rgba(255, 255, 255, 0.82);
    outline-offset: 2px;
}

.container {
    text-align: center;
    animation: fadeIn 1.8s ease-in-out;
}

h1 {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', sans-serif;
    font-size: clamp(0.5rem, 2.7vw, 0.65rem);
    font-weight: 200;
    letter-spacing: 0.12rem;
    text-transform: lowercase;
    white-space: nowrap;
    margin-bottom: 1.5rem;
    color: #f5f5f5;
}

.highlight-ai {
    color: #ffffff;
    opacity: 1;
    font-weight: 400;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.72);
}

.reduced-opacity {
    opacity: 0.55;
}

.brandmark {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    margin-top: 0.3rem;
    color: #d0d0d0;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.07rem;
}

.brandmark__text {
    opacity: 0.5;
}

@media (max-width: 768px) {
    .brandmark {
        font-size: 0.7rem;
    }
}

/* Shell — bottom-docked, full-width, no frame, no theatre */
.shell {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: none;
    margin: 0;
    z-index: 20;
    height: var(--shell-height);
    background: rgba(var(--shell-body-rgb), 0.96);
    border: 0;
    border-top: var(--hairline) solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    color: rgba(246, 246, 246, 0.8);
    backdrop-filter: none;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: height 0.22s ease, background 0.22s ease;
}

.shell.shell--collapsed {
    height: var(--shell-collapsed-height);
    background: rgba(var(--shell-grey-rgb), 0.9);
}

.shell__viewport {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
    font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: clamp(11px, 0.92vw, 13px);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    text-align: left;
}

.shell__chrome {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 0 0 24px;
    min-height: 24px;
    padding: 0 12px;
    background: rgba(36, 36, 36, 0.9);
    border-bottom: var(--hairline) solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', sans-serif;
    font-size: clamp(11px, 0.92vw, 13px);
    font-weight: 400;
    letter-spacing: 0;
    cursor: default;
}

.shell__traffic {
    position: absolute;
    left: 10px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transform: translateY(-50%);
    min-width: 44px;
    min-height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.shell__traffic-dot {
    width: 5px;
    height: 5px;
    display: block;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    opacity: 1;
}

.shell__traffic:hover .shell__traffic-dot,
.shell__traffic:focus-visible .shell__traffic-dot {
    background: rgba(255, 255, 255, 0.38);
}

.shell__traffic:focus-visible {
    outline: 0.5px solid rgba(255, 255, 255, 0.42);
    outline-offset: 2px;
}

.shell__title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: calc(100% - 96px);
    white-space: nowrap;
    opacity: 0.6;
}

.shell__brand {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', sans-serif;
    font-weight: 500;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.6);
}

.shell__history {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 16px 4px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    scrollbar-width: none;
    background: transparent;
}

.shell.shell--collapsed .shell__history,
.shell.shell--collapsed .shell__form {
    opacity: 0;
    pointer-events: none;
}

.shell__history::-webkit-scrollbar {
    display: none;
}

.shell__line {
    min-height: 1.5em;
}

.shell__muted {
    color: rgba(246, 246, 246, 0.42);
}

.shell__command-line .shell__muted {
    margin-left: 0;
}

.shell__access-line {
    width: fit-content;
    cursor: pointer;
    color: rgba(246, 246, 246, 0.8);
}

.shell__access-line:hover,
.shell__access-line:focus-visible {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: underline;
    outline: 0;
}

.shell__form {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 0;
    flex: 0 0 auto;
    padding: 4px 16px 16px;
    margin-top: 0;
}

.shell__prompt {
    flex: 0 0 auto;
    color: rgba(246, 246, 246, 0.84);
}

.shell__command-input {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: rgba(246, 246, 246, 0.92);
    caret-color: rgba(246, 246, 246, 0.9);
    font: inherit;
    letter-spacing: 0;
    outline: none;
    padding: 0 0 0 4px;
}

.shell__command-input:focus-visible {
    outline: 0;
    outline-offset: -2px;
}

@media (max-width: 720px) {
    :root {
        --shell-height: clamp(200px, 46vh, 320px);
    }

    .shell {
        left: 0;
        right: 0;
        width: 100vw;
        max-width: none;
        margin: 0;
        bottom: 0;
        border: 0;
        border-top: var(--hairline) solid rgba(255, 255, 255, 0.12);
        border-radius: 0;
        background: rgba(var(--shell-body-rgb), 0.96);
        backdrop-filter: none;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    }

    .shell__viewport {
        font-size: 11px;
        line-height: 1.5;
    }

    .shell__chrome {
        flex-basis: 24px;
        min-height: 24px;
        padding: 0 12px;
        background: rgba(36, 36, 36, 0.9);
        border-bottom-color: rgba(255, 255, 255, 0.08);
        font-size: 11px;
    }

    .shell__history {
        padding: 8px 12px 4px;
    }

    .shell__form {
        padding: 4px 12px 14px;
    }

}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }

    .gate__caret {
        animation: none !important;
        opacity: 1;
    }
}

/* Access gate */
.gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.gate.active {
    display: flex;
}

.gate__overlay {
    position: absolute;
    inset: 0;
    background: #000000;
    z-index: 0;
    cursor: pointer;
}

.gate__content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 24px;
    animation: modalFadeIn 0.5s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gate__notice {
    max-width: 340px;
    font-size: 11px;
    font-weight: 300;
    line-height: 1.9;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
}

.gate__field {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: min(340px, 76vw);
    min-height: 44px;
    cursor: text;
    outline: none;
}

.gate__field:focus-within {
    outline: 0.5px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.gate__caret {
    position: relative;
    z-index: 2;
    font-size: 13px;
    line-height: 1;
    font-weight: 200;
    color: #ffffff;
    animation: caretPulse 1.2s ease-in-out infinite;
}

@keyframes caretPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.1; }
}

.gate__dots {
    position: relative;
    z-index: 2;
    max-width: min(260px, 62vw);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.75);
    overflow: hidden;
    white-space: nowrap;
}

.gate__capture {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    color: transparent;
    caret-color: transparent;
    opacity: 0.01;
    outline: none;
    font-size: 16px;
    text-align: center;
}

.gate__capture:focus-visible {
    outline: 0.5px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.gate__actions {
    display: flex;
    gap: 18px;
    min-height: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.gate__actions.visible {
    opacity: 1;
    pointer-events: auto;
}

.gate__action {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.18em;
    line-height: 1.4;
    min-width: 24px;
    min-height: 24px;
    padding: 5px 4px;
    text-transform: lowercase;
}

.gate__action:hover,
.gate__action:focus-visible {
    color: rgba(255, 255, 255, 0.88);
    outline: 0.5px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.gate__error {
    font-size: 10px;
    letter-spacing: 0.1em;
    color: rgba(255, 120, 120, 0.55);
    min-height: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gate__error.visible {
    opacity: 1;
}

/* Privacy */
.privacy-page {
    min-height: 100vh;
    height: auto;
    display: block;
    overflow: auto;
    padding: 0;
    background: #050505;
    color: rgba(255, 255, 255, 0.82);
    font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.privacy-page::before {
    display: none;
}

.privacy {
    width: min(920px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 40px 0 64px;
    font-size: 11px;
    line-height: 1.75;
    letter-spacing: 0;
}

.privacy__back,
.privacy__updated {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}

.privacy__back:hover,
.privacy__back:focus-visible {
    color: rgba(255, 255, 255, 0.95);
    outline: 0.5px solid rgba(255, 255, 255, 0.5);
    outline-offset: 3px;
}

.privacy h1,
.privacy h2 {
    color: rgba(255, 255, 255, 0.9);
    font: inherit;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: lowercase;
}

.privacy h1 {
    margin: 32px 0 20px;
}

.privacy h2 {
    margin: 26px 0 6px;
}

.privacy p {
    max-width: 78ch;
    margin: 0 0 10px;
}

.privacy ul {
    max-width: 78ch;
    margin: 0 0 12px;
    padding-left: 2ch;
}

.privacy li {
    margin: 0 0 4px;
}

.privacy a {
    color: rgba(255, 255, 255, 0.86);
    text-underline-offset: 3px;
}
