:root {
    --bg: #f3f6fb;
    --bg-accent: linear-gradient(180deg, #eef4ff 0%, #f7f9fc 100%);
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --text: #14213d;
    --text-soft: #5f6b85;
    --text-faint: #8b96ac;
    --line: #d9e2ef;
    --line-strong: #c7d3e5;
    --primary: #165dff;
    --primary-dark: #0f4dd7;
    --primary-soft: #edf3ff;
    --success: #127a54;
    --warning: #9a6700;
    --danger: #b42318;
    --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --container: 1280px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --transition: 180ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: var(--bg-accent);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

p,
h1,
h2,
h3,
h4 {
    margin-top: 0;
}

ul[role="list"] {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    top: 16px;
    left: 16px;
    width: auto;
    height: auto;
    padding: 10px 14px;
    background: #111827;
    color: #ffffff;
    border-radius: 10px;
    z-index: 1000;
}

:focus-visible {
    outline: 3px solid rgba(22, 93, 255, 0.28);
    outline-offset: 2px;
}

.page-shell {
    width: min(100% - 24px, var(--container));
    margin: 0 auto;
    padding: 20px 0 56px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 10px 0 22px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #165dff 0%, #0ea5e9 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {
    margin: 0;
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    line-height: 1.1;
}

.eyebrow {
    margin: 0;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    font-weight: 700;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
}

.chip-live {
    background: #eafaf2;
    color: var(--success);
    border: 1px solid #c9ebd8;
}

.text-link {
    color: var(--primary);
    font-weight: 600;
}

.text-link:hover {
    text-decoration: underline;
}

.main-layout {
    display: grid;
    gap: 24px;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(199, 211, 229, 0.65);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 24px;
    padding: clamp(24px, 4vw, 40px);
    align-items: stretch;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: clamp(1.9rem, 4vw, 3.35rem);
    line-height: 1.1;
    margin-bottom: 14px;
    max-width: 12ch;
}

.hero-text {
    color: var(--text-soft);
    font-size: 1rem;
    max-width: 65ch;
    margin-bottom: 18px;
}

.hero-points {
    display: grid;
    gap: 10px;
}

.hero-points li {
    position: relative;
    padding-left: 18px;
    color: var(--text-soft);
    font-weight: 500;
}

.hero-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--primary);
}

.hero-aside {
    display: flex;
    align-items: stretch;
}

.formula-card {
    width: 100%;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
    border: 1px solid #d9e5ff;
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.formula-card h3 {
    margin-bottom: 14px;
    font-size: 1.2rem;
}

.formula-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid rgba(22, 93, 255, 0.1);
    gap: 12px;
}

.formula-row:first-of-type {
    border-top: 0;
}

.formula-row span {
    color: var(--text-soft);
    font-weight: 500;
}

.formula-row strong {
    color: var(--primary);
    font-size: 0.96rem;
}

.workspace {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 24px;
    align-items: start;
}

.panel {
    padding: 24px;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-title {
    margin: 4px 0 0;
    font-size: 1.35rem;
    line-height: 1.2;
}

.panel-note {
    margin: 0;
    max-width: 260px;
    color: var(--text-soft);
    font-size: 0.94rem;
    text-align: right;
}

.pitch-form {
    display: grid;
    gap: 20px;
}

.form-group {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    background: var(--surface-soft);
}

.form-group legend {
    padding: 0 10px;
    font-weight: 700;
    color: var(--text);
}

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

.two-col {
    grid-template-columns: 1fr 1fr;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-full {
    grid-column: 1 / -1;
}

label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

input,
select,
textarea {
    width: 100%;
    min-height: 50px;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: #ffffff;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

textarea {
    min-height: 118px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #b7c7dd;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(22, 93, 255, 0.12);
    outline: none;
    background: #ffffff;
}

.hint {
    color: var(--text-faint);
    font-size: 0.82rem;
    line-height: 1.45;
}

.ask-examples {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px dashed #c9d7ea;
}

.example-title {
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text);
}

.ask-examples ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.ask-examples li + li {
    margin-top: 8px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #165dff 0%, #0f4dd7 100%);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(22, 93, 255, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 18px 32px rgba(22, 93, 255, 0.28);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text);
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    background: #f8fbff;
}

.form-message {
    min-height: 24px;
    font-size: 0.92rem;
    color: var(--text-soft);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    background: #eef4ff;
    color: var(--primary);
    border: 1px solid #d7e4ff;
    white-space: nowrap;
}

.result-placeholder {
    min-height: 420px;
    border: 1px dashed var(--line-strong);
    border-radius: 24px;
    background: linear-gradient(180deg, #fbfcff 0%, #f8fbff 100%);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 28px;
}

.placeholder-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: #edf3ff;
    display: grid;
    place-items: center;
    font-size: 2rem;
    margin: 0 auto 14px;
}

.result-placeholder h3 {
    margin-bottom: 8px;
    font-size: 1.16rem;
}

.result-placeholder p {
    margin: 0;
    color: var(--text-soft);
    max-width: 50ch;
}

.hidden {
    display: none !important;
}

.result-shell {
    display: grid;
    gap: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mini-stat {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfdff;
    padding: 14px;
}

.mini-stat-label {
    display: block;
    color: var(--text-faint);
    font-size: 0.78rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.mini-stat strong {
    font-size: 1.1rem;
}

.result-block {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    padding: 18px;
}

.highlight-block {
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
    border-color: #d8e4ff;
}

.result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.result-head h3 {
    margin: 0;
    font-size: 1.02rem;
}

.result-block p {
    margin: 0;
    color: var(--text-soft);
    white-space: pre-line;
}

.copy-btn {
    border: 1px solid var(--line-strong);
    background: #ffffff;
    color: var(--text);
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.copy-btn:hover {
    background: #f8fbff;
    border-color: #b7c7dd;
}

.translation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.translation-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: #fbfdff;
}

.translation-card h4 {
    margin-bottom: 8px;
    font-size: 0.96rem;
}

.translation-card p {
    margin: 0;
    color: var(--text-soft);
    white-space: pre-line;
}

.validation-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
    color: var(--text-soft);
}

.validation-list li + li {
    margin-top: 8px;
}

.guide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.info-card {
    padding: 24px;
}

.clean-list {
    display: grid;
    gap: 10px;
}

.clean-list li {
    color: var(--text-soft);
    position: relative;
    padding-left: 18px;
}

.clean-list li::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--primary);
    position: absolute;
    left: 0;
    top: 11px;
}

.footer {
    text-align: center;
    padding-top: 28px;
    color: var(--text-faint);
    font-size: 0.9rem;
}

@media (max-width: 1080px) {
    .hero,
    .workspace,
    .guide-grid {
        grid-template-columns: 1fr;
    }

    .panel-note {
        max-width: 100%;
        text-align: left;
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100% - 18px, var(--container));
        padding-top: 14px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions {
        justify-content: flex-start;
    }

    .hero,
    .panel,
    .info-card {
        padding: 18px;
    }

    .two-col,
    .stats-grid,
    .guide-grid {
        grid-template-columns: 1fr;
    }

    .form-group {
        padding: 16px;
    }

    .hero-title {
        max-width: none;
    }

    .result-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}