:root {
    color-scheme: light;
    --ink: #1c2320;
    --muted: #69716d;
    --paper: #f4f1e9;
    --surface: #fffdf7;
    --line: #d8d4ca;
    --lime: #c9f45b;
    --lime-dark: #93bb27;
    --blue: #2447d8;
    --blue-soft: #e8ecff;
    --shadow: 0 24px 60px rgba(35, 41, 38, 0.08);
    --radius-lg: 28px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 84% 8%, rgba(201, 244, 91, 0.42), transparent 24rem),
        var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.page-shell {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 108px;
    border-bottom: 1px solid rgba(28, 35, 32, 0.18);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    grid-template-columns: repeat(3, 7px);
    align-items: end;
    gap: 3px;
    width: 32px;
    height: 32px;
    padding: 6px;
    border-radius: 9px;
    background: var(--ink);
}

.brand-mark span {
    display: block;
    border-radius: 3px;
    background: var(--lime);
}

.brand-mark span:nth-child(1) {
    height: 8px;
}

.brand-mark span:nth-child(2) {
    height: 18px;
}

.brand-mark span:nth-child(3) {
    height: 13px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 0.98rem;
    letter-spacing: -0.02em;
}

.brand small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.admin-link:hover {
    color: var(--surface);
    background: var(--ink);
    transform: translateY(-2px);
}

.hero {
    padding: clamp(70px, 10vw, 138px) 0 clamp(64px, 8vw, 100px);
}

.eyebrow,
.card-kicker {
    margin: 0 0 20px;
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 950px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.2rem, 8.4vw, 7.5rem);
    font-weight: 400;
    letter-spacing: -0.065em;
    line-height: 0.88;
}

.hero h1 em {
    color: var(--blue);
    font-weight: 400;
}

.hero-footer {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-top: 52px;
    padding-left: min(20vw, 245px);
}

.hero-footer > p:first-child {
    max-width: 485px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.7;
}

.site-count {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--line);
}

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

.site-card {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid rgba(28, 35, 32, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(255, 253, 247, 0.9);
    box-shadow: var(--shadow);
    animation: card-in 500ms both;
}

.site-card::after {
    position: absolute;
    right: -80px;
    bottom: -110px;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: var(--lime);
    content: "";
    opacity: 0.28;
}

.card-number {
    position: absolute;
    top: 25px;
    right: 28px;
    color: rgba(28, 35, 32, 0.2);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
}

.card-header {
    position: relative;
    z-index: 1;
    padding-right: 40px;
}

.card-kicker {
    margin-bottom: 11px;
}

.card-header h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.9rem, 3vw, 2.65rem);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 1;
}

.card-description {
    min-height: 1.4em;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.card-description:empty {
    display: none;
}

.environment-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    margin-top: 34px;
}

.environment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.environment-title {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.favicon-wrap {
    position: relative;
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.favicon-wrap img {
    position: relative;
    z-index: 1;
    display: block;
    object-fit: contain;
}

.environment-label,
.environment-title small {
    display: block;
}

.environment-label {
    font-size: 0.91rem;
    font-weight: 800;
}

.environment-title small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.73rem;
}

.protocol-links {
    display: flex;
    gap: 7px;
}

.protocol-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink);
    background: #eeece5;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}

.protocol-link:hover {
    color: #fff;
    background: var(--blue);
    transform: translateY(-2px);
}

.protocol-link.https {
    color: #26370a;
    background: var(--lime);
}

.protocol-link.https:hover {
    color: #fff;
    background: var(--ink);
}

.ftp-details {
    display: grid;
    flex: 1 0 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

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

.ftp-details dt {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ftp-details dd {
    overflow-wrap: anywhere;
    margin: 0;
    cursor: copy;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    -webkit-user-select: none;
    transition: all 150ms ease;
}
.ftp-details dd:hover {
    text-shadow: 0px 0px 6px;
}
.ftp-details dd:active {
    text-shadow: 0px 0px 2px;
}

.status-card {
    display: grid;
    min-height: 260px;
    place-items: center;
    align-content: center;
    gap: 16px;
    padding: 40px;
    border: 1px dashed #b9b5aa;
    border-radius: var(--radius-lg);
    color: var(--muted);
    text-align: center;
}

.status-card p {
    max-width: 480px;
    margin: 0;
    line-height: 1.6;
}

.status-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    font-weight: 400;
}

.saved-groups {
    display: grid;
    gap: 18px;
    width: min(100%, 560px);
}

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

.saved-group-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    text-decoration: none;
    transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.saved-group-link:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.saved-group-link span:first-child {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-group-link small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.loader {
    width: 30px;
    height: 30px;
    border: 3px solid var(--line);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    margin-top: clamp(70px, 10vw, 130px);
    padding: 26px 0 40px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-footer p {
    margin: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
}

@media (max-width: 860px) {
    .sites-grid {
        grid-template-columns: 1fr;
    }

    .hero-footer {
        padding-left: 0;
    }
}

@media (max-width: 600px) {
    .page-shell {
        width: min(100% - 24px, 1280px);
    }

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

    .admin-link {
        padding: 9px 12px;
        font-size: 0.76rem;
    }

    .hero {
        padding-top: 72px;
    }

    .hero h1 {
        font-size: clamp(3rem, 16vw, 5rem);
    }

    .hero-footer {
        display: block;
        margin-top: 36px;
    }

    .site-count {
        margin-top: 22px;
    }

    .site-card {
        padding: 25px 18px 20px;
        border-radius: 22px;
    }

    .environment {
        align-items: stretch;
        flex-direction: column;
    }

    .protocol-links {
        width: 100%;
    }

    .protocol-link {
        flex: 1;
    }

    .saved-group-link {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .saved-group-link small {
        display: none;
    }

    .ftp-details {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
