:root {
    --bg: #f6f8fb;
    --panel: #ffffff;
    --panel-dark: #141a22;
    --text: #1f2730;
    --muted: #5c6673;
    --line: #dee4eb;
    --primary: #ff6a00;
    --primary-dark: #df5600;
    --primary-soft: #fff1e7;
    --ink: #222a33;
    --soft: #eef2f7;
    --shadow-soft: 0 10px 30px rgba(20, 30, 44, 0.08);
    --shadow-card: 0 14px 34px rgba(18, 25, 35, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: url("../images/deltalyth-bg-pattern.svg");
    background-position: center top;
    background-size: cover;
}

main {
    flex: 1;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.narrow {
    width: min(760px, 92vw);
}

.site-header {
    background: rgba(20, 26, 34, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 20;
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
    gap: 24px;
}

.brand {
    text-decoration: none;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
}

.brand-wordmark {
    width: 148px;
    height: auto;
    display: block;
}

.main-nav {
    display: flex;
    gap: 18px;
}

.main-nav a {
    text-decoration: none;
    color: #e8edf6;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a.portal-link {
    border: 1px solid rgba(255, 116, 25, 0.75);
    border-radius: 9px;
    padding: 8px 12px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 106, 0, 0.22), rgba(255, 106, 0, 0.05));
}

.main-nav a.portal-link:hover {
    background: linear-gradient(135deg, rgba(255, 106, 0, 0.34), rgba(255, 106, 0, 0.14));
    border-color: rgba(255, 142, 67, 1);
}

.main-nav a:hover {
    color: #ffffff;
}

.hero {
    padding: 72px 0 56px;
    background: linear-gradient(130deg, #151b24 0%, #232c37 42%, #2f3a47 100%);
    color: #f7fbff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 32px;
    align-items: stretch;
}

h1,
h2,
h3 {
    margin-top: 0;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    margin-bottom: 16px;
}

h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin-bottom: 16px;
}

.lead {
    font-size: 1.08rem;
    color: #d7dde8;
    margin-bottom: 24px;
    max-width: 64ch;
}

.lead.compact {
    color: var(--muted);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffb178;
    margin: 0 0 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    text-decoration: none;
    display: inline-block;
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.22s ease;
}

.btn.primary {
    background: linear-gradient(145deg, #ff7a1f, #ff6400);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(255, 106, 0, 0.28);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 106, 0, 0.33);
}

.btn.ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.03);
}

.btn.ghost:hover {
    border-color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.06);
}

.btn.ghost.on-light {
    color: var(--ink);
    border-color: #cad4e2;
}

.btn.ghost.on-light:hover {
    background: #f5f8fd;
    border-color: #b5c4d8;
}

.btn.danger {
    color: #fff;
    background: #b33a3a;
    border-color: #b33a3a;
}

.btn.danger:hover {
    background: #9a2f2f;
    border-color: #9a2f2f;
}

.btn-inline {
    padding: 6px 10px;
    font-size: 0.84rem;
}

.signal-card {
    background: rgba(15, 20, 27, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 24px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.hero-logo-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 18px;
}

.hero-logo {
    width: 100%;
    height: auto;
    display: block;
}

.card-title {
    margin-top: 0;
    margin-bottom: 14px;
    font-weight: 700;
}

.signal-card ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

.section {
    padding: 54px 0;
}

.section.muted {
    background: linear-gradient(180deg, #f2f5fa 0%, #edf1f7 100%);
    border-top: 1px solid rgba(31, 39, 48, 0.05);
    border-bottom: 1px solid rgba(31, 39, 48, 0.05);
}

.page-intro {
    padding: 56px 0 24px;
    position: relative;
}

.page-intro::after {
    content: "";
    position: absolute;
    right: 6vw;
    top: 20px;
    width: 120px;
    height: 120px;
    background: url("../images/deltalyth-icon.svg") no-repeat center / contain;
    opacity: 0.07;
    pointer-events: none;
}

.page-intro .lead,
.page-intro .eyebrow,
.page-intro p {
    color: var(--muted);
}

.card-grid {
    display: grid;
    gap: 18px;
}

.card-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.one {
    grid-template-columns: 1fr;
}

.feature-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    margin-bottom: 22px;
    box-shadow: var(--shadow-soft);
}

.blog-thumb {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
    margin-bottom: 14px;
    box-shadow: var(--shadow-soft);
}

.info-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
}

.info-card p,
.info-card li,
.info-card td,
.info-card th {
    color: var(--muted);
}

.meta {
    font-size: 0.86rem;
    color: #768294;
    margin-bottom: 10px;
}

.text-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.text-link:hover {
    color: var(--primary-dark);
}

.article-body {
    font-size: 1.04rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.clean-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.info-card.stat h2 {
    margin-bottom: 6px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    text-align: left;
    font-size: 0.92rem;
    padding: 8px;
    border-bottom: 1px solid var(--line);
}

.table th {
    color: var(--ink);
}

.login-card {
    max-width: 520px;
}

.login-form {
    display: grid;
    gap: 12px;
}

.login-form label {
    font-weight: 600;
    color: var(--text);
}

.login-form input {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: #fbfcfe;
}

.login-form textarea,
.content-editor-section textarea,
.content-editor-section input {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    width: 100%;
    background: #fbfcfe;
}

.login-form input:focus,
.login-form textarea:focus,
.content-editor-section textarea:focus,
.content-editor-section input:focus {
    outline: none;
    border-color: #ff9a52;
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
}

.login-form button {
    margin-top: 8px;
    width: fit-content;
    cursor: pointer;
}

.staff-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.login-card.wide {
    max-width: 100%;
}

.content-editor-grid {
    display: grid;
    gap: 20px;
}

.editor-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    align-items: start;
}

.preview-card {
    position: sticky;
    top: 92px;
}

.page-preview {
    width: 100%;
    min-height: 760px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.content-editor-section {
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcff;
}

.content-editor-section h2 {
    margin-bottom: 2px;
}

.bubble-list {
    display: grid;
    gap: 14px;
}

.bubble-item {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.content-editor-section label {
    font-weight: 600;
    color: var(--text);
}

.action-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.action-inline form {
    margin: 0;
}

.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.pill.published {
    color: #14663c;
    background: #dff5e9;
}

.pill.unpublished {
    color: #8b4f08;
    background: #fff0d8;
}

.crew-card {
    text-align: left;
}

.crew-avatar {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
    margin-bottom: 12px;
}

.form-error {
    color: #a12020 !important;
    font-weight: 600;
}

.flash-wrap {
    margin-top: 18px;
}

.flash-message {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #ffd1b3;
    background: #fff3ea;
    color: #7a3400;
    font-weight: 600;
}

.site-footer {
    background: #141a22;
    color: #d0d7e4;
    margin-top: 46px;
    padding-top: 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 22px;
    padding-bottom: 22px;
}

.footer-title {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.footer-wordmark {
    width: 160px;
    height: auto;
    margin-bottom: 10px;
    display: block;
}

.footer-bottom {
    padding: 14px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 920px) {
    .hero-grid,
    .card-grid.three,
    .card-grid.two,
    .footer-grid,
    .stats-row,
    .editor-layout {
        grid-template-columns: 1fr;
    }

    .preview-card {
        position: static;
    }

    .page-preview {
        min-height: 560px;
    }

    .nav-wrap {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 0;
    }

    .main-nav {
        flex-wrap: wrap;
    }

    .brand-wordmark {
        width: 132px;
    }

    .page-intro::after {
        width: 92px;
        height: 92px;
        opacity: 0.05;
    }
}
