.titanic-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 1.5rem;
}

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

.titanic-form {
    position: relative;
    z-index: 1;
}

.titanic-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.form-field__label {
    color: var(--text);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-field__control {
    -webkit-appearance: none;
    appearance: none;
    min-height: 52px;
    padding: 0.9rem 1rem;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.form-field input[type="number"].form-field__control {
    -webkit-appearance: auto;
    appearance: auto;
    color-scheme: dark;
    padding-right: 0.7rem;
}

.form-field__control:focus {
    border-color: rgba(255, 184, 77, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 184, 77, 0.12);
    background: rgba(255, 255, 255, 0.07);
}

.form-field__control::placeholder {
    color: rgba(183, 189, 201, 0.72);
}

.form-field select.form-field__control {
    padding-right: 3rem;
    background-color: rgba(255, 255, 255, 0.08);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1.5 1.75L6 6.25L10.5 1.75' stroke='%23f5f7fa' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: calc(100% - 1rem) 52%;
    background-size: 0.72rem 0.48rem;
    background-repeat: no-repeat;
}

.form-field select.form-field__control option {
    background: #d6d9de;
    color: #11151c;
}

.form-field input[type="number"].form-field__control::-webkit-inner-spin-button {
    opacity: 1;
    filter: brightness(1.15);
}

.form-field__help {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.titanic-form__actions {
    margin-top: 1.5rem;
}

.titanic-result {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 220px;
}

.titanic-result[data-state="idle"] {
    border-color: var(--surface-border);
}

.titanic-result[data-state="loading"] {
    border-color: rgba(255, 184, 77, 0.38);
}

.titanic-result[data-state="success"] {
    border-color: rgba(106, 196, 135, 0.42);
    background: linear-gradient(180deg, rgba(106, 196, 135, 0.08), rgba(255, 255, 255, 0.03));
}

.titanic-result[data-state="error"] {
    border-color: rgba(255, 122, 122, 0.38);
    background: linear-gradient(180deg, rgba(255, 122, 122, 0.08), rgba(255, 255, 255, 0.03));
}

.titanic-result__status {
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
}

.titanic-result__list {
    display: grid;
    gap: 0.9rem;
    margin: 0;
}

.titanic-result__list div {
    padding: 0.95rem 1rem;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
}

.titanic-result__list dt {
    margin-bottom: 0.35rem;
    color: var(--accent);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.titanic-result__list dd {
    margin: 0;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 700;
    min-height: 1.4em;
}

.titanic-request-card {
    margin-top: 1rem;
}

.titanic-code {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: rgba(7, 10, 14, 0.7);
    color: #dce2ec;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

@media only screen and (max-width: 980px) {
    .titanic-layout,
    .titanic-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width: 760px) {
    .titanic-form__grid {
        grid-template-columns: 1fr;
    }
}
