* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --page: #312f2f;
    --panel: #000000;
    --field: #111111;
    --line: #2a2a2a;
    --text: #ffffff;
    --muted: #c7c7c7;
    --shadow: 0 0 35px rgba(0, 0, 0, 0.4);
    --font-heading: "Oswald", Arial, sans-serif;
    --font-body: Arial, sans-serif;
}

html {
    min-width: 320px;
    background: var(--page);
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--page);
    color: var(--text);
    font-family: var(--font-body);
}

button,
input,
select {
    font: inherit;
}

.site-shell {
    width: min(100%, 1440px);
    margin: 0 auto;
    padding: clamp(20px, 4vw, 34px);
}

.site-header {
    display: flex;
    align-items: center;
    min-height: 54px;
}

.brand {
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 4vw, 2.15rem);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.tool-layout {
    display: grid;
    grid-template-columns: minmax(260px, 390px) minmax(320px, 450px);
    justify-content: center;
    align-items: stretch;
    gap: clamp(20px, 3vw, 42px);
    padding-block: clamp(42px, 13vh, 170px) clamp(50px, 7vw, 96px);
}

.panel {
    width: 100%;
    min-height: 450px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.format-panel {
    padding: 28px 20px;
}

.format-panel h2,
.tool-panel h1,
.faq-section h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
}

.format-panel h2 {
    font-size: clamp(1.55rem, 3vw, 1.8rem);
}

.tool-panel {
    display: grid;
    min-height: 450px;
}

.panel-stage {
    display: none;
    grid-area: 1 / 1;
    min-width: 0;
    padding: clamp(24px, 4vw, 30px) clamp(20px, 4vw, 28px);
}

.panel-stage.is-active {
    display: flex;
    flex-direction: column;
}

.tool-panel h1 {
    font-size: clamp(2rem, 4vw, 2.25rem);
}

.check-list {
    display: grid;
    gap: 13px;
    margin: 42px 0 0;
    padding: 0;
    list-style: none;
    color: var(--text);
    font-size: 1.125rem;
    line-height: 1.3;
}

.check-list li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
}

.check-list li::before {
    content: "\2713";
    font-weight: 700;
}

.feature-list {
    margin-top: 44px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 180px;
    min-height: 45px;
    border: 1px solid var(--text);
    border-radius: 0;
    padding: 0 22px;
    cursor: pointer;
    transition: transform 160ms ease, opacity 160ms ease, background-color 160ms ease;
}

.primary-button {
    background: var(--text);
    color: #000000;
}

.secondary-button {
    background: transparent;
    color: var(--text);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.upload-button {
    position: relative;
    margin-top: 18px;
}

.upload-button input {
    position: absolute;
    width: 1px;
    height: 7px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.details-form {
    gap: 20px;
}

.details-list {
    display: grid;
    gap: 16px;
    margin: 18px 0 10px;
}

.details-list div {
    min-width: 0;
}

.details-list dt {
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.35;
}

.details-list dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-size: 1rem;
    line-height: 1.35;
}

.form-grid {
    display: grid;
    gap: 12px;
}

.form-grid label {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.form-grid span {
    color: var(--muted);
    font-size: 0.86rem;
}

.form-grid input,
.form-grid select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--field);
    color: var(--text);
    padding: 0 12px;
    outline: none;
}

.form-grid input:focus,
.form-grid select:focus {
    border-color: var(--text);
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
}

.status-text {
    min-height: 22px;
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

.status-text.is-error {
    color: #ffb0b0;
}

.trust-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: center;
    padding-block: clamp(16px, 3vw, 34px) clamp(36px, 5vw, 72px);
}

.trust-row strong {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1;
}

.trust-row strong:nth-child(2) {
    text-align: center;
}

.trust-row strong:nth-child(3) {
    text-align: right;
}

.faq-section {
    max-width: 960px;
    padding-bottom: 64px;
}

.faq-section h2 {
    font-size: clamp(1.85rem, 4vw, 2.5rem);
}

.faq-list {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.faq-item h3,
.faq-item p {
    margin: 0;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.5;
}

.faq-item h3 {
    font-weight: 700;
}

.faq-item p {
    margin-top: 4px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .site-shell {
        padding-inline: 20px;
    }

    .tool-layout {
        grid-template-columns: minmax(0, 520px);
        justify-content: stretch;
        padding-block: 26px 48px;
    }

    .format-panel {
        display: none;
    }

    .panel,
    .tool-panel {
        min-height: 0;
    }

    .tool-panel {
        width: 100%;
    }

    .panel-stage {
        min-height: min(78vh, 540px);
    }

    .trust-row {
        padding-top: 0;
    }
}

@media (max-width: 560px) {
    .site-shell {
        padding: 24px 15px;
    }

    .site-header {
        min-height: 44px;
    }

    .tool-layout {
        padding-top: 32px;
    }

    .panel-stage {
        min-height: 330px;
        padding: 24px 15px;
    }

    .feature-list {
        margin-top: 28px;
        gap: 10px;
        font-size: 1rem;
    }

    .upload-button,
    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .action-row {
        display: grid;
    }

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

    .trust-row strong {
        font-size: clamp(1.45rem, 8vw, 1.7rem);
    }

    .faq-list {
        gap: 16px;
    }
}
