/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #1a1a1a;
}

/* ── Nav ── */
.nav {
    background: white;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.nav-brand {
    font-size: 18px;
    font-weight: 700;
    color: #0066cc;
    text-decoration: none;
    letter-spacing: -0.3px;
}

.nav-logout {
    font-size: 14px;
    color: #666;
    text-decoration: none;
}

.nav-logout:hover { color: #1a1a1a; }

/* ── Layout ── */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ── Page header ── */
.page-header {
    background: white;
    padding: 28px 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.page-header h1 {
    margin: 0 0 6px 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.page-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* ── Filter bar ── */
.search-section {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

#catalogue-search {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    width: 220px;
    margin-left: auto;
    transition: border-color 0.15s;
}

#catalogue-search:focus {
    outline: none;
    border-color: #0066cc;
}

.filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 6px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    color: #444;
}

.filter-tag:hover { background: #e4e4e4; }

.filter-tag.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* ── Provider section ── */
.provider-section { margin-bottom: 32px; }

.provider-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.provider-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    color: white;
    flex-shrink: 0;
}

.provider-icon.aws  { background: #FF9900; }
.provider-icon.azure { background: #0078D4; }
.provider-icon.gke  { background: #4285F4; }

.provider-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.3px;
}

/* ── Projects grid ── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

/* ── Project card ── */
.project-card {
    background: white;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid transparent;
}

.project-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    border-color: #e0e0e0;
}

.project-card.deprecated {
    opacity: 0.7;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.project-name {
    font-size: 16px;
    font-weight: 600;
    color: #0066cc;
    margin: 0;
    line-height: 1.3;
}

.favorite {
    font-size: 18px;
    color: #ccc;
    flex-shrink: 0;
    margin-left: 8px;
}

.favorite.favorited { color: #FFD700; }

.project-meta {
    display: flex;
    gap: 14px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.project-tag {
    padding: 3px 10px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 12px;
    color: #555;
}

.project-tag.deprecated {
    background: #fee;
    color: #c00;
}

.project-tag.popular {
    background: #fff3cd;
    color: #856404;
}

.project-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.latest-version {
    font-size: 13px;
    color: #666;
}

.latest-version strong {
    color: #1a1a1a;
    font-weight: 600;
}

.update-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.update-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.update-dot.recent   { background: #22c55e; }
.update-dot.moderate { background: #f59e0b; }
.update-dot.stale    { background: #ef4444; }

/* ── Login page ── */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f5f5f5;
}

.login-card {
    background: white;
    border-radius: 10px;
    padding: 40px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: #0066cc;
    margin: 0 0 6px 0;
    letter-spacing: -0.4px;
}

.login-subtitle {
    color: #666;
    margin: 0 0 28px 0;
    font-size: 15px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: #0066cc;
}

.btn-primary {
    width: 100%;
    padding: 11px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s;
}

.btn-primary:hover { background: #0055aa; }

.login-note {
    margin-top: 20px;
    font-size: 12px;
    color: #999;
    text-align: center;
    line-height: 1.5;
}

/* ── Project detail page ── */
.project-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-detail-header h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.project-detail-meta {
    margin: 0;
    color: #666;
    font-size: 15px;
}

.project-detail-meta a {
    color: #0066cc;
    text-decoration: none;
}

.project-detail-meta a:hover { text-decoration: underline; }

.project-detail-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.back-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
}

.back-link:hover { color: #1a1a1a; }

#release-search {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    width: 220px;
    transition: border-color 0.15s;
}

#release-search:focus {
    outline: none;
    border-color: #0066cc;
}

.no-results {
    color: #888;
    font-size: 15px;
    padding: 24px 0;
}

/* ── User status banner ── */
.user-status {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
}

/* ── Timeline ── */
.timeline-card {
    background: white;
    border-radius: 8px;
    padding: 24px 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.timeline-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 24px 0;
    letter-spacing: -0.3px;
}

.release {
    border-left: 3px solid #e0e0e0;
    padding-left: 24px;
    margin-bottom: 32px;
    position: relative;
}

.release::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    border: 3px solid white;
}

.release.current {
    border-left-color: #0066cc;
}

.release.current::before {
    background: #0066cc;
}

.release-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.version {
    font-size: 20px;
    font-weight: 600;
    color: #0066cc;
    text-decoration: none;
}

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

.release-date {
    color: #666;
    font-size: 14px;
}

.your-version-marker {
    color: #0066cc;
    font-size: 14px;
}

/* ── Release tags ── */
.release-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.tag.breaking        { background: #fee;    color: #c00;    border: 1px solid #fcc; }
.tag.behavior        { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }
.tag.not-recommended { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.tag.safe-skip       { background: #e7f3ff; color: #004085; border: 1px solid #b8daff; }
.tag.briefing        { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ── Skip indicator ── */
.skip-indicator {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 14px;
}

/* ── Release notes (markdown output) ── */
.release-notes {
    margin-top: 10px;
    color: #444;
    font-size: 14px;
    line-height: 1.6;
}

.release-notes p  { margin: 0 0 8px 0; }
.release-notes p:last-child { margin-bottom: 0; }
.release-notes strong { color: #1a1a1a; }
.release-notes code {
    background: #f5f5f5;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── Load more ── */
.load-more-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #444;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s;
}

.load-more-btn:hover { background: #ebebeb; }

/* ── Release detail page ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.breadcrumb a { color: #0066cc; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: #ccc; }

.release-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.release-title-row h1 {
    margin: 0 0 6px 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.release-version-heading {
    color: #0066cc;
}

.release-meta {
    margin: 0 0 14px 0;
    color: #666;
    font-size: 15px;
}

/* ── Two column layout ── */
.release-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

@media (max-width: 900px) {
    .release-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Main column sections ── */
.release-section {
    background: white;
    border-radius: 8px;
    padding: 24px 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    letter-spacing: -0.2px;
}

/* ── Engineer's Briefing ── */
.briefing-section {
    border-left: 4px solid #0066cc;
}

.briefing-content {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

.briefing-content h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 8px 0;
    color: #1a1a1a;
}

.briefing-content h2:first-child { margin-top: 0; }

.briefing-content h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 6px 0;
    color: #444;
}

.briefing-content p { margin: 0 0 10px 0; }
.briefing-content p:last-child { margin-bottom: 0; }

.briefing-content code {
    background: #f0f4ff;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: #0055aa;
}

/* ── Compatibility table ── */
.compat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.compat-table th {
    text-align: left;
    padding: 8px 12px;
    background: #f8f8f8;
    border-bottom: 2px solid #e8e8e8;
    font-weight: 600;
    color: #444;
    font-size: 13px;
}

.compat-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.compat-table tr:last-child td { border-bottom: none; }

.compat-project { font-weight: 500; }
.compat-version code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
}
.compat-note { color: #666; font-size: 13px; }

/* ── Test evidence ── */
.test-evidence {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
}

.test-evidence.passed { background: #e8f5e9; border: 1px solid #c8e6c9; }
.test-evidence.failed { background: #fdecea; border: 1px solid #f5c6cb; }

.test-status { flex-shrink: 0; font-size: 16px; }
.test-description { flex: 1; line-height: 1.5; }
.test-link { color: #0066cc; text-decoration: none; white-space: nowrap; font-size: 13px; }
.test-link:hover { text-decoration: underline; }

/* ── Sidebar ── */
.release-sidebar { position: sticky; top: 72px; }

.sidebar-section {
    background: white;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-link {
    display: block;
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 0;
    border-bottom: 1px solid #f5f5f5;
}

.sidebar-link:last-child { border-bottom: none; }
.sidebar-link:hover { text-decoration: underline; }

/* ── Artefacts ── */
.artefact {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.artefact:last-child { border-bottom: none; }

.artefact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.artefact-label {
    font-size: 14px;
    font-weight: 500;
}

.artefact-version {
    font-size: 12px;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: #555;
}

.artefact-links {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.artefact-link {
    font-size: 13px;
    color: #0066cc;
    text-decoration: none;
}

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