:root {
    --bg-top: #63c3e9;
    --bg-mid: #dff4fc;
    --bg-bottom: #f4fbff;
    --surface: rgba(255, 255, 255, 0.7);
    --ink: #17222b;
    --muted: #61717d;
    --line: rgba(73, 112, 137, 0.20);
    --line-strong: rgba(73, 112, 137, 0.42);
    --accent: #e67e22;
    --max-width: 1180px;
    --radius: 5px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(
            180deg,
            var(--bg-top) 0%,
            #9fdcf3 18%,
            var(--bg-mid) 38%,
            var(--bg-bottom) 60%,
            #edf8fd 100%
        );
    background-attachment: fixed;
    color: var(--ink);
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

.shell {
    width: min(calc(100% - 48px), var(--max-width));
    margin-inline: auto;
}

.admin-link,
.icon-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(23, 34, 43, 0.58);
    cursor: pointer;
}

.admin-link:hover,
.icon-button:hover {
    color: var(--ink);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 10px 0 32px;
}

.hero-admin {
    position: absolute;
    top: 14px;
    right: 22px;
    z-index: 2;
    padding: 6px 0;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.hero-aircraft {
    width: min(96vw, 1520px);
    margin: 0 auto -16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-aircraft img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-copy {
    text-align: center;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(48px, 5.9vw, 76px);
    line-height: 0.98;
    font-weight: 500;
    letter-spacing: -0.05em;
}

.hero-accent {
    display: block;
    width: 28px;
    height: 3px;
    margin: 18px auto 14px;
    border-radius: 999px;
    background: var(--accent);
}

.hero-copy p {
    margin: 0 auto;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.17em;
}

.tools-section {
    padding-top: 20px;
    padding-bottom: 74px;
}

.tools-list {
    border-top: 1px solid var(--line);
}

.tool {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 42px;
    align-items: center;
    padding: 27px 0;
    border-bottom: 1px solid var(--line);
}

.tool-copy {
    max-width: 600px;
}

.tool h3 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 650;
    letter-spacing: -0.025em;
}

.tool p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
}

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.action-button,
.primary-button,
.secondary-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.action-button,
.secondary-button {
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.36);
    color: var(--ink);
    backdrop-filter: blur(3px);
}

.action-button:hover,
.secondary-button:hover {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(23, 34, 43, 0.58);
    transform: translateY(-1px);
}

.action-button:first-child:hover {
    border-color: var(--accent);
}

.primary-button {
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
}

.primary-button:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.danger-button {
    border: 1px solid #b9a6a6;
    background: transparent;
    color: #6e2d2d;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.14);
}

.footer-inner {
    min-height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    color: var(--muted);
    font-size: 12px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(12, 31, 43, 0.42);
    backdrop-filter: blur(5px);
}

.modal-backdrop[hidden] {
    display: none;
}

.modal {
    width: min(900px, 100%);
    max-height: calc(100vh - 56px);
    overflow: auto;
    background: #f7fbfd;
    border: 1px solid rgba(73, 112, 137, 0.30);
    box-shadow: 0 24px 80px rgba(20, 52, 70, 0.22);
}

.login-modal {
    width: min(420px, 100%);
    border-radius: 10px;
    overflow: hidden;
}

.modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 26px 28px;
    background: rgba(247, 251, 253, 0.96);
    border-bottom: 1px solid var(--line);
}

.login-header {
    position: static;
}

.modal-header h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.icon-button {
    font-size: 30px;
    line-height: 1;
}

.login-form {
    padding: 28px;
}

.login-form .form-row:last-of-type {
    margin-bottom: 18px;
}

.login-submit {
    width: 100%;
    min-height: 44px;
}

.login-error {
    margin-bottom: 20px;
    padding: 11px 12px;
    border: 1px solid rgba(176, 67, 52, 0.32);
    border-radius: 5px;
    background: rgba(255, 238, 235, 0.92);
    color: #8f3427;
    font-size: 13px;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-header-actions form {
    margin: 0;
}

.admin-logout {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 5px 0;
    font-size: 12px;
    cursor: pointer;
}

.admin-logout:hover {
    color: var(--ink);
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--line);
}

.admin-toolbar p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.admin-list {
    padding: 0 28px;
}

.admin-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.admin-item strong,
.admin-item span {
    display: block;
}

.admin-item strong {
    margin-bottom: 5px;
    font-size: 15px;
}

.admin-item span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.editor-panel {
    padding: 28px;
}

.form-row {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
}

.form-row label,
.upload-card > span {
    font-size: 12px;
    font-weight: 700;
}

.form-row input,
.form-row textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink);
    border-radius: 5px;
    padding: 12px 13px;
    outline: none;
}

.form-row input:focus,
.form-row textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.10);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 4px 0 28px;
}

.upload-card {
    min-height: 126px;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 8px;
    padding: 18px;
    border: 1px dashed var(--line-strong);
    cursor: pointer;
}

.upload-card:hover {
    border-style: solid;
    border-color: var(--accent);
}

.upload-card input {
    width: 100%;
    font-size: 12px;
}

.upload-card small {
    color: var(--muted);
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.editor-footer-actions {
    display: flex;
    gap: 8px;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .hero {
        padding-top: 14px;
        padding-bottom: 28px;
    }

    .hero-aircraft {
        width: min(112vw, 1220px);
    }

    .tool {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .tool-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(calc(100% - 28px), var(--max-width));
    }

    .hero {
        padding-top: 24px;
        padding-bottom: 28px;
    }

    .hero-admin {
        top: 8px;
        right: 14px;
    }

    .hero-aircraft {
        width: 136vw;
        margin-left: -18vw;
        margin-bottom: -5px;
    }

    .hero-copy h1 {
        font-size: clamp(42px, 14vw, 58px);
    }

    .hero-accent {
        margin-top: 14px;
        margin-bottom: 12px;
    }

    .hero-copy p {
        max-width: 92%;
        font-size: 14px;
    }

    .tools-section {
        padding-top: 14px;
        padding-bottom: 58px;
    }

    .tool {
        padding: 25px 0;
    }

    .tool-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .action-button {
        width: 100%;
    }

    .footer-inner {
        padding-block: 22px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }

    .modal-backdrop {
        padding: 0;
        place-items: stretch;
    }

    .modal {
        width: 100%;
        max-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .login-modal {
        display: flex;
        min-height: 100vh;
        flex-direction: column;
        justify-content: center;
        background: #f7fbfd;
    }

    .admin-toolbar,
    .editor-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .form-grid,
    .upload-grid {
        grid-template-columns: 1fr;
    }

    .editor-footer-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
}
