:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #101828;
    --muted: #667085;
    --line: #e4e7ec;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --soft: #ecfdf3;
    --warning: #fff7ed;
    --shadow: 0 24px 60px rgba(16, 24, 40, .08);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, #e0f2fe 0, transparent 34rem), var(--bg);
    color: var(--text);
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    width: min(1120px, calc(100% - 32px));
    margin: 24px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}

.topbar nav {
    display: flex;
    gap: 18px;
    font-size: 14px;
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 28px auto 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
}

.hero-card,
.content-card,
.side-card {
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(228,231,236,.9);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: clamp(24px, 4vw, 42px);
}

.app-hero {
    display: flex;
    align-items: center;
    gap: clamp(18px, 4vw, 32px);
}

.app-icon {
    width: clamp(96px, 18vw, 148px);
    height: clamp(96px, 18vw, 148px);
    object-fit: cover;
    border-radius: 32px;
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(16, 24, 40, .14);
    background: #fff;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: .08em;
}

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

h1 {
    margin-bottom: 6px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: .98;
    letter-spacing: -0.05em;
}

h2 {
    margin-bottom: 12px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.developer {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 14px;
}

.description {
    color: var(--muted);
    max-width: 62ch;
    line-height: 1.65;
    margin-bottom: 0;
}

.slug-line {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.slug-line strong {
    color: var(--text);
}

.stats-grid {
    margin: 34px 0 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
}

.stats-grid div {
    min-height: 86px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    padding: 12px;
    text-align: center;
    border-right: 1px solid var(--line);
}

.stats-grid div:last-child {
    border-right: 0;
}

.stats-grid strong {
    font-size: 20px;
}

.stats-grid span {
    color: var(--muted);
    font-size: 13px;
}

.download-area {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.download-area p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.download-button {
    appearance: none;
    border: 0;
    min-width: 180px;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 16px 36px rgba(15, 118, 110, .26);
    cursor: pointer;
}

.download-button:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.download-button.disabled {
    background: #98a2b3;
    cursor: not-allowed;
    box-shadow: none;
}

.side-card {
    padding: 28px;
    align-self: start;
    position: sticky;
    top: 18px;
}

.seal {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: var(--primary-dark);
    background: var(--soft);
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 16px;
}

.safety-card p,
.content-card p,
.steps {
    color: var(--muted);
    line-height: 1.7;
}

.content-card {
    padding: 30px;
}

.wide {
    grid-column: 1 / -1;
}

.info-list {
    margin: 24px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.info-list div {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: #fff;
}

.info-list dt {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.info-list dd {
    margin: 0;
    font-weight: 700;
    word-break: break-word;
}

.steps {
    padding-left: 20px;
    margin-bottom: 0;
}

.steps li + li {
    margin-top: 10px;
}

.footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto 36px;
    color: var(--muted);
    font-size: 14px;
}

.admin-shell {
    width: min(980px, calc(100% - 32px));
    margin: 40px auto;
}

.admin-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: clamp(22px, 4vw, 34px);
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

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

label {
    display: block;
    font-weight: 800;
    margin-bottom: 8px;
}

input,
textarea {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

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

.help-text {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    border: 0;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    padding: 13px 18px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn.secondary {
    background: #eef2f6;
    color: var(--text);
}

.btn:hover {
    text-decoration: none;
    filter: brightness(.96);
}

.notice,
.error-list {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 18px;
}

.notice {
    background: var(--soft);
    color: #05603a;
}

.error-list {
    background: #fef3f2;
    color: #b42318;
}

.error-list ul {
    margin: 0;
    padding-left: 18px;
}

.current-file {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f9fafb;
    border: 1px solid var(--line);
    color: var(--muted);
}

@media (max-width: 860px) {
    .topbar {
        align-items: flex-start;
    }

    .topbar nav {
        display: none;
    }

    .page-shell {
        grid-template-columns: 1fr;
    }

    .side-card {
        position: static;
    }

    .app-hero {
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid div:nth-child(2) {
        border-right: 0;
    }

    .stats-grid div:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }

    .info-list,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .app-hero {
        flex-direction: column;
    }

    .download-button {
        width: 100%;
    }
}

.public-link {
    word-break: break-word;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f9fafb;
}

.slug-line {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
    word-break: break-word;
}
