.hardware-widget {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.hardware-control-panel,
.storage-hierarchy-panel,
.hardware-explanation-panel {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 20px;
    background: white;
    border: 1px solid #e5e7eb;
}

.hardware-explanation-panel {
    margin: 0.75rem 0;
}

.hardware-explanation-panel h3 {
    margin-top: 0;
    margin-bottom: 0.35rem;
}

.hardware-explanation-panel p {
    margin: 0.3rem 0;
}

.control-label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 700;
    color: #334155;
}

.hardware-button-row,
.hardware-action-row,
.storage-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0.7rem 0;
}

.hardware-mode-btn,
.storage-chip,
.hardware-secondary-btn {
    border: 1px solid #cbd5e1;
    background: white;
    color: #334155;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hardware-mode-btn:hover,
.storage-chip:hover,
.hardware-secondary-btn:hover {
    transform: translateY(-1px);
    border-color: #0f172a;
}

.hardware-mode-btn.active,
.storage-chip.active {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
}

.hardware-secondary-btn {
    background: transparent;
    color: #334155;
}

.hardware-flow-card {
    margin: 1rem 0;
    padding: 0.75rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
    border: 1px solid #dbeafe;
    overflow-x: auto;
}

.hardware-flow-svg {
    width: 100%;
    min-width: 760px;
    height: auto;
    display: block;
}

.hardware-node-group {
    cursor: pointer;
}

.hardware-node {
    fill: white;
    stroke: #94a3b8;
    stroke-width: 2;
    filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.10));
    transition: fill 0.25s ease, stroke 0.25s ease, stroke-width 0.25s ease;
}

.hardware-node.active {
    fill: #eff6ff;
    stroke: #2563eb;
    stroke-width: 4;
}

.hardware-node-group:hover .hardware-node {
    fill: #f8fafc;
    stroke: #0f172a;
}

.hardware-node-group:focus .hardware-node {
    stroke: #0f172a;
    stroke-width: 4;
}

.hardware-node-title {
    font-size: 18px;
    font-weight: 800;
    fill: #0f172a;
    pointer-events: none;
}

.hardware-node-subtitle {
    font-size: 13px;
    fill: #64748b;
    pointer-events: none;
}

.hardware-link {
    stroke: #94a3b8;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke 0.25s ease, stroke-width 0.25s ease;
}

.hardware-link.active {
    stroke: #2563eb;
    stroke-width: 6;
}

.hardware-example {
    font-weight: 700;
    color: #1e3a8a;
}

.hardware-status {
    margin-top: 0.45rem;
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-weight: 700;
}

.storage-bars {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.storage-bar-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.75rem;
    align-items: center;
}

.storage-bar-row span {
    font-weight: 700;
    color: #334155;
}

.storage-bar-track {
    height: 16px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    width: 20%;
    border-radius: 999px;
    background: #0f172a;
    transition: width 0.35s ease;
}

.storage-hierarchy-text {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #14532d;
    font-weight: 650;
}

@media (max-width: 700px) {
    .storage-bar-row {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .hardware-widget {
        padding: 0.8rem;
    }
}