/* PQ Crypta Health Monitor - Main Styles */
/* CSP Compliant: No inline styles */

:root {
    --hm-primary: #00e5ff;
    --hm-primary-dark: #0077b6;
    --hm-primary-light: #90e0ef;
    --hm-accent: #00e676;
    --hm-accent-dark: #00c853;

    --hm-bg-deep: #030812;
    --hm-bg-card: #0c1525;
    --hm-bg-card-hover: #12203a;
    --hm-bg-panel: #0a1628;

    --hm-text: #e0ecff;
    --hm-text-dim: #7a9cc6;
    --hm-text-muted: #3d5a80;

    --hm-border: #1a3050;
    --hm-border-hover: #264060;

    --hm-green: #00e676;
    --hm-green-glow: rgba(0, 230, 118, 0.35);
    --hm-amber: #ffab00;
    --hm-amber-glow: rgba(255, 171, 0, 0.35);
    --hm-red: #ff1744;
    --hm-red-glow: rgba(255, 23, 68, 0.35);
    --hm-cyan: #00e5ff;
    --hm-cyan-glow: rgba(0, 229, 255, 0.25);
    --hm-purple: #b388ff;
    --hm-purple-glow: rgba(179, 136, 255, 0.25);

    --hm-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --hm-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    --hm-shadow-glow: 0 0 20px rgba(0, 229, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: transparent;
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--hm-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #030812 0%, #0a1628 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--hm-cyan) 0%, var(--hm-accent) 100%);
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--hm-accent) 0%, var(--hm-primary-light) 100%);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.6);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--hm-cyan) #030812;
}

/* ===== HEADER - Unique Vital Signs Monitor Theme ===== */
.health-header {
    background:
        linear-gradient(135deg, #041210 0%, #071e1a 30%, #0a2520 60%, #061815 100%);
    padding: 2rem 1rem;
    box-shadow:
        0 4px 30px rgba(0, 230, 118, 0.15),
        inset 0 -1px 0 rgba(0, 230, 118, 0.1);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--hm-green), var(--hm-cyan), var(--hm-green), transparent) 1;
    position: relative;
    z-index: 50;
    overflow: hidden;
}

/* ECG flatline decoration across header bottom */
.health-header::before {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 230, 118, 0.3) 20%,
        rgba(0, 230, 118, 0.6) 40%,
        rgba(0, 229, 255, 0.8) 50%,
        rgba(0, 230, 118, 0.6) 60%,
        rgba(0, 230, 118, 0.3) 80%,
        transparent 100%);
    animation: headerPulse 3s ease-in-out infinite;
}

@keyframes headerPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Subtle vital signs grid overlay on header */
.health-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 230, 118, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 230, 118, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-image {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    box-shadow:
        0 0 15px rgba(0, 230, 118, 0.4),
        0 0 40px rgba(0, 230, 118, 0.15);
    border: 2px solid rgba(0, 230, 118, 0.2);
    transition: all 0.3s ease;
}

.logo-image:hover {
    box-shadow:
        0 0 20px rgba(0, 230, 118, 0.6),
        0 0 50px rgba(0, 230, 118, 0.25);
    border-color: rgba(0, 230, 118, 0.4);
}

.title-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #00e676 0%, #00e5ff 50%, #b388ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    text-shadow: none;
}

.page-subtitle {
    font-size: 1.1rem;
    color: rgba(0, 230, 118, 0.7);
    font-weight: 300;
    margin: 0;
    letter-spacing: 0.03em;
}

.badge-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.badge-img {
    height: 20px;
    filter: saturate(1.2);
}

.header-meta {
    text-align: right;
    font-size: 0.8rem;
    color: var(--hm-text-muted);
    flex-shrink: 0;
}

.header-session-id {
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--hm-text-dim);
    font-size: 0.75rem;
}

.header-timestamp {
    margin-top: 0.2rem;
}

/* ===== MAIN CONTENT ===== */
.hm-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 10;
}

/* ===== SUMMARY CARDS ===== */
.hm-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.hm-stat-card {
    background: var(--hm-bg-panel);
    border: 1px solid var(--hm-border);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all var(--hm-transition);
    position: relative;
    overflow: hidden;
}

.hm-stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.hm-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hm-shadow);
    border-color: var(--hm-border-hover);
}

.hm-stat-card-healthy::before { background: var(--hm-green); }
.hm-stat-card-unhealthy::before { background: var(--hm-red); }
.hm-stat-card-rate::before { background: var(--hm-cyan); }
.hm-stat-card-total::before { background: var(--hm-purple); }
.hm-stat-card-time::before { background: var(--hm-amber); }
.hm-stat-card-status::before { background: var(--hm-green); }

.hm-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--hm-text-muted);
    margin-bottom: 0.5rem;
}

.hm-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.hm-stat-value-healthy { color: var(--hm-green); }
.hm-stat-value-unhealthy { color: var(--hm-red); }
.hm-stat-value-rate { color: var(--hm-cyan); }
.hm-stat-value-total { color: var(--hm-purple); }
.hm-stat-value-time { color: var(--hm-amber); }
.hm-stat-value-status { color: var(--hm-green); }
.hm-stat-value-status-degraded { color: var(--hm-amber); }
.hm-stat-value-status-unhealthy { color: var(--hm-red); }

/* ===== CONTROLS ===== */
.hm-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.hm-search {
    flex: 1;
    min-width: 200px;
    padding: 0.65rem 1rem;
    background: var(--hm-bg-panel);
    border: 1px solid var(--hm-border);
    border-radius: 6px;
    color: var(--hm-text);
    font-family: inherit;
    font-size: 0.85rem;
    transition: border-color var(--hm-transition);
}

.hm-search:focus {
    outline: none;
    border-color: var(--hm-cyan);
    box-shadow: 0 0 0 2px var(--hm-cyan-glow);
}

.hm-search::placeholder {
    color: var(--hm-text-muted);
}

.hm-filter-select {
    padding: 0.65rem 1rem;
    background: var(--hm-bg-panel);
    border: 1px solid var(--hm-border);
    border-radius: 6px;
    color: var(--hm-text);
    font-family: inherit;
    font-size: 0.85rem;
    transition: border-color var(--hm-transition);
    min-width: 140px;
}

.hm-filter-select:focus {
    outline: none;
    border-color: var(--hm-cyan);
}

.hm-btn {
    padding: 0.65rem 1.2rem;
    background: var(--hm-bg-card);
    border: 1px solid var(--hm-border);
    border-radius: 6px;
    color: var(--hm-text);
    font-family: inherit;
    font-size: 0.85rem;
    transition: all var(--hm-transition);
    white-space: nowrap;
}

.hm-btn:hover {
    background: var(--hm-bg-card-hover);
    border-color: var(--hm-border-hover);
    transform: translateY(-1px);
}

.hm-btn:focus {
    outline: 2px solid var(--hm-cyan);
    outline-offset: 2px;
}

.hm-endpoint-count {
    font-size: 0.8rem;
    color: var(--hm-text-muted);
    align-self: center;
    white-space: nowrap;
}

/* ===== SECTIONS GRID (4-column) ===== */
.hm-sections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

/* Expanded section spans full width */
.hm-section:has(.hm-section-body-open) {
    grid-column: 1 / -1;
}

/* ===== SECTION GROUPS ===== */
.hm-section {
    border: 1px solid var(--hm-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--hm-bg-panel);
}

.hm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.9rem;
    background: var(--hm-bg-card);
    border-bottom: 1px solid transparent;
    transition: all var(--hm-transition);
}

.hm-section-header:hover {
    background: var(--hm-bg-card-hover);
}

.hm-section-header-expanded {
    border-bottom-color: var(--hm-border);
}

.hm-section-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--hm-text);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.hm-section-icon {
    font-size: 1rem;
    opacity: 0.8;
}

.hm-section-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.55rem;
    border-radius: 10px;
    font-weight: 500;
}

.hm-badge-healthy {
    background: rgba(0, 230, 118, 0.15);
    color: var(--hm-green);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.hm-badge-mixed {
    background: rgba(255, 171, 0, 0.15);
    color: var(--hm-amber);
    border: 1px solid rgba(255, 171, 0, 0.3);
}

.hm-badge-error {
    background: rgba(255, 23, 68, 0.15);
    color: var(--hm-red);
    border: 1px solid rgba(255, 23, 68, 0.3);
}

.hm-section-chevron {
    font-size: 0.75rem;
    color: var(--hm-text-muted);
    transition: transform var(--hm-transition);
}

.hm-section-chevron-open {
    transform: rotate(180deg);
}

.hm-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hm-section-body-open {
    max-height: 20000px;
}

/* ===== ENDPOINT ROWS ===== */
.hm-endpoint {
    display: grid;
    grid-template-columns: 20px 1fr 55px 55px 75px;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(26, 48, 80, 0.4);
    font-size: 0.78rem;
    transition: background var(--hm-transition);
}

.hm-endpoint:last-child {
    border-bottom: none;
}

.hm-endpoint:hover {
    background: rgba(0, 229, 255, 0.03);
}

.hm-endpoint-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    justify-self: center;
}

.hm-dot-healthy {
    background: var(--hm-green);
    box-shadow: 0 0 6px var(--hm-green-glow);
}

.hm-dot-warning {
    background: var(--hm-amber);
    box-shadow: 0 0 6px var(--hm-amber-glow);
}

.hm-dot-error {
    background: var(--hm-red);
    box-shadow: 0 0 6px var(--hm-red-glow);
    animation: dotBlink 1.5s ease-in-out infinite;
}

@keyframes dotBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hm-endpoint-name {
    color: var(--hm-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm-endpoint-method {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-align: center;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

.hm-method-get { color: var(--hm-green); background: rgba(0, 230, 118, 0.1); }
.hm-method-post { color: var(--hm-cyan); background: rgba(0, 229, 255, 0.1); }
.hm-method-put { color: var(--hm-amber); background: rgba(255, 171, 0, 0.1); }
.hm-method-delete { color: var(--hm-red); background: rgba(255, 23, 68, 0.1); }
.hm-method-patch { color: var(--hm-purple); background: rgba(179, 136, 255, 0.1); }
.hm-method-options { color: var(--hm-text-dim); background: rgba(122, 156, 198, 0.1); }

.hm-endpoint-status {
    font-size: 0.75rem;
    text-align: center;
}

.hm-status-code-2xx { color: var(--hm-green); }
.hm-status-code-4xx { color: var(--hm-amber); }
.hm-status-code-5xx { color: var(--hm-red); }
.hm-status-code-0 { color: var(--hm-text-muted); }

.hm-endpoint-time {
    font-size: 0.75rem;
    text-align: right;
    color: var(--hm-text-dim);
    font-variant-numeric: tabular-nums;
}

.hm-time-fast { color: var(--hm-green); }
.hm-time-normal { color: var(--hm-cyan); }
.hm-time-slow { color: var(--hm-amber); }
.hm-time-very-slow { color: var(--hm-red); }

/* Error detail row - spans within the endpoint's inner grid */
.hm-endpoint-error {
    grid-column: 2 / -1;
    font-size: 0.72rem;
    color: var(--hm-red);
    padding: 0.15rem 0 0;
    opacity: 0.85;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== NO DATA ===== */
.hm-no-data {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--hm-text-muted);
    font-size: 1rem;
}

.hm-no-data-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== FOOTER - Vital Signs Theme ===== */
.health-footer {
    background: linear-gradient(135deg, #041210 0%, #071e1a 50%, #061815 100%);
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--hm-green), var(--hm-cyan), var(--hm-green), transparent) 1;
    padding: 2rem 1rem;
    margin-top: 4rem;
    box-shadow: 0 -4px 30px rgba(0, 230, 118, 0.1);
    position: relative;
    z-index: 50;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.copyright {
    font-size: 1rem;
    color: var(--hm-text-dim);
    margin-bottom: 1rem;
}

.copyright strong {
    color: var(--hm-accent);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.footer-link {
    color: var(--hm-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--hm-primary-light);
    text-decoration: underline;
}

.footer-separator {
    color: var(--hm-border);
}

.document-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hm-border);
    font-size: 0.9rem;
    color: var(--hm-text-dim);
    line-height: 1.8;
}

.document-info strong {
    color: var(--hm-text);
}

.document-info a {
    color: var(--hm-accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .hm-sections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .logo-image {
        width: 70px;
        height: 70px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .header-meta {
        text-align: left;
    }

    .hm-main {
        padding: 1rem 0.75rem;
    }

    .hm-sections-grid {
        grid-template-columns: 1fr;
    }

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

    .hm-controls {
        flex-direction: column;
    }

    .hm-search {
        min-width: unset;
    }

    .hm-endpoint {
        grid-template-columns: 20px 1fr 50px 70px;
        font-size: 0.75rem;
    }

    .hm-endpoint-status {
        display: none;
    }
}

@media (max-width: 480px) {
    .hm-summary {
        grid-template-columns: 1fr;
    }

    .hm-endpoint {
        grid-template-columns: 16px 1fr 50px;
    }

    .hm-endpoint-time {
        display: none;
    }
}

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

@media (prefers-contrast: high) {
    :root {
        --hm-bg-deep: #000;
        --hm-bg-panel: #111;
        --hm-text: #fff;
        --hm-border: #555;
    }
}

/* Focus visible for keyboard nav */
.hm-section-header:focus-visible,
.hm-btn:focus-visible,
.hm-search:focus-visible,
.hm-filter-select:focus-visible {
    outline: 2px solid var(--hm-cyan);
    outline-offset: 2px;
}

/* ===== HEALTH CHECK ARTICLE ===== */
.hm-article {
    max-width: 1400px;
    margin: 4rem auto 0;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}

.hm-article-inner {
    background: var(--hm-bg-panel);
    border: 1px solid var(--hm-border);
    border-radius: 16px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.hm-article-inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hm-green), var(--hm-cyan), var(--hm-purple), var(--hm-cyan), var(--hm-green));
}

.hm-article-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #00e676 0%, #00e5ff 50%, #b388ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.hm-article-subtitle {
    font-size: 1.1rem;
    color: var(--hm-text-dim);
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--hm-border);
}

.hm-article h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--hm-primary);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 229, 255, 0.15);
}

.hm-article h2:first-of-type {
    margin-top: 0;
}

.hm-article h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--hm-accent);
    margin: 1.5rem 0 0.75rem;
}

.hm-article p {
    color: var(--hm-text);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.hm-article-lead {
    font-size: 1.1rem;
    color: var(--hm-text);
    line-height: 1.9;
}

/* Flow diagram */
.hm-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: rgba(0, 229, 255, 0.03);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: 12px;
}

.hm-flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    background: var(--hm-bg-card);
    border: 1px solid var(--hm-border);
    border-radius: 8px;
    min-width: 120px;
    transition: all var(--hm-transition);
}

.hm-flow-step:hover {
    border-color: var(--hm-cyan);
    box-shadow: 0 0 12px var(--hm-cyan-glow);
    transform: translateY(-2px);
}

.hm-flow-icon {
    font-size: 1.5rem;
}

.hm-flow-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hm-text);
    text-align: center;
}

.hm-flow-desc {
    font-size: 0.7rem;
    color: var(--hm-text-muted);
    text-align: center;
}

.hm-flow-arrow {
    font-size: 1.2rem;
    color: var(--hm-cyan);
    flex-shrink: 0;
}

/* Comparison table */
.hm-compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--hm-border);
}

.hm-compare-table thead th {
    background: var(--hm-bg-card);
    color: var(--hm-primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--hm-border);
}

.hm-compare-table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--hm-text);
    border-bottom: 1px solid rgba(26, 48, 80, 0.4);
    vertical-align: top;
}

.hm-compare-table tbody tr:last-child td {
    border-bottom: none;
}

.hm-compare-table tbody tr:hover td {
    background: rgba(0, 229, 255, 0.03);
}

.hm-compare-table .hm-table-label {
    color: var(--hm-text-dim);
    font-weight: 600;
    white-space: nowrap;
}

.hm-table-highlight {
    color: var(--hm-accent);
    font-weight: 600;
}

/* Spec grid */
.hm-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.hm-spec-card {
    background: var(--hm-bg-card);
    border: 1px solid var(--hm-border);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all var(--hm-transition);
}

.hm-spec-card:hover {
    border-color: var(--hm-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--hm-shadow);
}

.hm-spec-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.hm-spec-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--hm-primary);
    margin-bottom: 0.35rem;
}

.hm-spec-card-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--hm-accent);
    line-height: 1.2;
}

.hm-spec-card-desc {
    font-size: 0.75rem;
    color: var(--hm-text-muted);
    margin-top: 0.35rem;
    line-height: 1.5;
}

/* Architecture layers */
.hm-arch-layers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.hm-arch-layer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--hm-bg-card);
    border: 1px solid var(--hm-border);
    border-radius: 8px;
    transition: all var(--hm-transition);
}

.hm-arch-layer:hover {
    border-color: var(--hm-border-hover);
    background: var(--hm-bg-card-hover);
}

.hm-arch-layer-num {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--hm-cyan);
    flex-shrink: 0;
    width: 2rem;
    text-align: center;
}

.hm-arch-layer-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hm-text);
    min-width: 140px;
}

.hm-arch-layer-desc {
    font-size: 0.82rem;
    color: var(--hm-text-dim);
    flex: 1;
}

.hm-arch-layer-tech {
    font-size: 0.72rem;
    color: var(--hm-cyan);
    font-family: 'SF Mono', 'Fira Code', monospace;
    flex-shrink: 0;
}

/* Algorithm families */
.hm-algo-families {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.hm-algo-family {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--hm-bg-card);
    border: 1px solid var(--hm-border);
    border-radius: 8px;
}

.hm-algo-family-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.hm-algo-family-info {
    flex: 1;
}

.hm-algo-family-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--hm-text);
}

.hm-algo-family-count {
    font-size: 0.72rem;
    color: var(--hm-text-muted);
}

.hm-algo-family-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hm-green);
    padding: 0.2rem 0.6rem;
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.25);
    border-radius: 6px;
    flex-shrink: 0;
}

/* FIPS callout */
.hm-callout {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--hm-cyan);
    background: rgba(0, 229, 255, 0.05);
}

.hm-callout-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hm-cyan);
    margin-bottom: 0.5rem;
}

.hm-callout p {
    font-size: 0.88rem;
    margin-bottom: 0;
}

.hm-callout-green {
    border-left-color: var(--hm-green);
    background: rgba(0, 230, 118, 0.05);
}

.hm-callout-green .hm-callout-title {
    color: var(--hm-green);
}

/* Article responsive */
@media (max-width: 768px) {
    .hm-article-inner {
        padding: 1.5rem;
    }

    .hm-article-title {
        font-size: 1.5rem;
    }

    .hm-flow {
        flex-direction: column;
    }

    .hm-flow-arrow {
        transform: rotate(90deg);
    }

    .hm-arch-layer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .hm-arch-layer-tech {
        align-self: flex-end;
    }

    .hm-compare-table {
        font-size: 0.78rem;
    }

    .hm-compare-table thead th,
    .hm-compare-table tbody td {
        padding: 0.5rem 0.6rem;
    }
}

/* Legal notice */
.legal-notice {
    position: relative;
    z-index: 50;
}

.legal-notice-center {
    text-align: center;
    padding: 1rem;
    color: var(--hm-text-muted);
    font-size: 0.8rem;
}
